Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / ddi_dev_nregs.9f
blob1c9ee779df99ffa60101f1a1d5db1cdc8341ff70
1 '\" te
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_NREGS 9F "Jan 16, 2006"
7 .SH NAME
8 ddi_dev_nregs \- return the number of register sets a device has
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/conf.h>
13 #include <sys/ddi.h>
14 #include <sys/sunddi.h>
18 \fBint\fR \fBddi_dev_nregs\fR(\fBdev_info_t *\fR\fIdip\fR, \fBint *\fR\fIresultp\fR);
19 .fi
21 .SH INTERFACE LEVEL
22 .sp
23 .LP
24 Solaris DDI specific (Solaris DDI).
25 .SH PARAMETERS
26 .sp
27 .ne 2
28 .na
29 \fB\fIdip\fR\fR
30 .ad
31 .RS 11n
32 A pointer to the device's \fBdev_info\fR structure.
33 .RE
35 .sp
36 .ne 2
37 .na
38 \fB\fIresultp\fR\fR
39 .ad
40 .RS 11n
41 Pointer to an integer that holds the number of register sets on return.
42 .RE
44 .SH DESCRIPTION
45 .sp
46 .LP
47 The \fBddi_dev_nregs()\fR function returns the number of sets of registers the
48 device has.
49 .SH RETURN VALUES
50 .sp
51 .LP
52 The \fBddi_dev_nregs()\fR function returns:
53 .sp
54 .ne 2
55 .na
56 \fB\fBDDI_SUCCESS\fR\fR
57 .ad
58 .RS 15n
59 A successful return. The number of register sets is returned in \fIresultp\fR.
60 .RE
62 .sp
63 .ne 2
64 .na
65 \fB\fBDDI_FAILURE\fR\fR
66 .ad
67 .RS 15n
68 The device has no registers.
69 .RE
71 .SH CONTEXT
72 .sp
73 .LP
74 The \fBddi_dev_nregs()\fR function can be called from user, interrupt, or
75 kernel context.
76 .SH SEE ALSO
77 .sp
78 .LP
79 \fBddi_dev_nintrs\fR(9F), \fBddi_dev_regsize\fR(9F)
80 .sp
81 .LP
82 \fIWriting Device Drivers\fR