| Current File : //usr/share/man/man9f/ddi_dev_nregs.9f |
'\" te
.\" Copyright (c) 2006, Sun Microsystems, Inc.
.TH ddi_dev_nregs 9F "16 Jan 2006" "SunOS 5.11" "Kernel Functions for Drivers"
.SH NAME
ddi_dev_nregs \- return the number of register sets a device has
.SH SYNOPSIS
.LP
.nf
#include <sys/conf.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
\fBint\fR \fBddi_dev_nregs\fR(\fBdev_info_t *\fR\fIdip\fR, \fBint *\fR\fIresultp\fR);
.fi
.SH INTERFACE LEVEL
.sp
.LP
Solaris DDI specific (Solaris DDI).
.SH PARAMETERS
.sp
.ne 2
.mk
.na
\fB\fIdip\fR\fR
.ad
.RS 11n
.rt
A pointer to the device's \fBdev_info\fR structure.
.RE
.sp
.ne 2
.mk
.na
\fB\fIresultp\fR\fR
.ad
.RS 11n
.rt
Pointer to an integer that holds the number of register sets on return.
.RE
.SH DESCRIPTION
.sp
.LP
The \fBddi_dev_nregs()\fR function returns the number of sets of registers the device has.
.SH RETURN VALUES
.sp
.LP
The \fBddi_dev_nregs()\fR function returns:
.sp
.ne 2
.mk
.na
\fB\fBDDI_SUCCESS\fR\fR
.ad
.RS 15n
.rt
A successful return. The number of register sets is returned in \fIresultp\fR.
.RE
.sp
.ne 2
.mk
.na
\fB\fBDDI_FAILURE\fR\fR
.ad
.RS 15n
.rt
The device has no registers.
.RE
.SH CONTEXT
.sp
.LP
The \fBddi_dev_nregs()\fR function can be called from user, interrupt, or kernel context.
.SH SEE ALSO
.sp
.LP
\fBddi_dev_nintrs\fR(9F), \fBddi_dev_regsize\fR(9F)
.sp
.LP
\fIWriting Device Drivers for Oracle Solaris 11.2\fR