1ddi_dev_regsize(9F)      Kernel Functions for Drivers      ddi_dev_regsize(9F)
2
3
4

NAME

6       ddi_dev_regsize - return the size of a device's register
7

SYNOPSIS

9       #include <sys/conf.h>
10       #include <sys/ddi.h>
11       #include <sys/sunddi.h>
12
13
14
15       int ddi_dev_regsize(dev_info_t *dip, uint_t rnumber, off_t *resultp);
16
17

INTERFACE LEVEL

19       Solaris DDI specific (Solaris DDI).
20

PARAMETERS

22       dip        A pointer to the device's dev_info structure.
23
24
25       rnumber    The ordinal register number. Device registers are associated
26                  with a dev_info and are enumerated in arbitrary sets from  0
27                  on  up.  The  number of registers a device has can be deter‐
28                  mined from a call to ddi_dev_nregs(9F).
29
30
31       resultp    Pointer to an integer that holds the size, in bytes, of  the
32                  described register (if it exists).
33
34

DESCRIPTION

36       The  ddi_dev_regsize()  function  returns  the  size,  in bytes, of the
37       device register specified by dip and rnumber. This is useful when,  for
38       example,  one  of  the  registers is a frame buffer with a varying size
39       known only to its proms.
40

RETURN VALUES

42       The ddi_dev_regsize() function returns:
43
44       DDI_SUCCESS    A successful return. The size, in bytes, of  the  speci‐
45                      fied register, is set in resultp.
46
47
48       DDI_FAILURE    An invalid (nonexistent) register number was specified.
49
50

CONTEXT

52       The  ddi_dev_regsize()  function can be called from user, interrupt, or
53       kernel context.
54

SEE ALSO

56       ddi_dev_nintrs(9F), ddi_dev_nregs(9F)
57
58
59       Writing Device Drivers
60
61
62
63SunOS 5.11                        16 Jan 2006              ddi_dev_regsize(9F)
Impressum