2 .\" Copyright (c) 2006, Sun Microsystems, Inc.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH DDI_DEV_REGSIZE 9F "Jan 16, 2006"
8 ddi_dev_regsize \- return the size of a device's register
14 #include <sys/sunddi.h>
18 \fBint\fR \fBddi_dev_regsize\fR(\fBdev_info_t *\fR\fIdip\fR, \fBuint_t\fR \fIrnumber\fR, \fBoff_t *\fR\fIresultp\fR);
24 Solaris DDI specific (Solaris DDI).
32 A pointer to the device's \fBdev_info\fR structure.
41 The ordinal register number. Device registers are associated with a
42 \fBdev_info\fR and are enumerated in arbitrary sets from \fB0\fR on up. The
43 number of registers a device has can be determined from a call to
44 \fBddi_dev_nregs\fR(9F).
53 Pointer to an integer that holds the size, in bytes, of the described register
60 The \fBddi_dev_regsize()\fR function returns the size, in bytes, of the device
61 register specified by \fIdip\fR and \fIrnumber\fR. This is useful when, for
62 example, one of the registers is a frame buffer with a varying size known only
67 The \fBddi_dev_regsize()\fR function returns:
71 \fB\fBDDI_SUCCESS\fR\fR
74 A successful return. The size, in bytes, of the specified register, is set in
81 \fB\fBDDI_FAILURE\fR\fR
84 An invalid (nonexistent) register number was specified.
90 The \fBddi_dev_regsize()\fR function can be called from user, interrupt, or
95 \fBddi_dev_nintrs\fR(9F), \fBddi_dev_nregs\fR(9F)
98 \fIWriting Device Drivers\fR