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

NAME

6       pm_busy_component,  pm_idle_component - control device component avail‐
7       ability for Power Management
8

SYNOPSIS

10       #include <sys/ddi.h>
11       #include <sys/sunddi.h>
12
13
14
15       int pm_busy_component(dev_info_t *dip, int component);
16
17
18       int pm_idle_component(dev_info_t *dip, int component);
19
20

INTERFACE LEVEL

22       Solaris DDI specific (Solaris DDI)
23

PARAMETERS

25       dip          Pointer to the device's dev_info structure.
26
27
28       component    The number of the component to be power-managed.
29
30

DESCRIPTION

32       The pm_busy_component() function sets component  of  dip  to  be  busy.
33       Calls  to  pm_busy_component()  are  stacked, requiring a corresponding
34       number of calls to  pm_idle_component()  to  make  the  component  idle
35       again.  When  a device is busy it will not be power-managed by the sys‐
36       tem.
37
38
39       The pm_idle_component() function marks component  idle,  recording  the
40       time  that  component  went idle. This function must be called once for
41       each call to pm_busy_component(). A component which is idle  is  avail‐
42       able  to  be power-managed by the system. The pm_idle_component() func‐
43       tion has no effect if the component is already idle, except  to  update
44       the system's notion of when the device went idle.
45
46
47       If  these  functions  are called as a result of entry into the driver's
48       attach(9E), detach(9E) or power(9E) entry point, these  functions  must
49       be  called from the same thread which entered attach(9E), detach(9E) or
50       power(9E).
51

RETURN VALUES

53       The pm_busy_component() and pm_idle_component() functions return:
54
55       DDI_SUCCESS    Successfully set the indicated component busy or idle.
56
57
58       DDI_FAILURE    Invalid component number component or the device has  no
59                      components.
60
61

CONTEXT

63       These  functions can be called from user or kernel context. These func‐
64       tions may also be called from interrupt context, providing they are not
65       the first Power Management function called by the driver.
66

ATTRIBUTES

68       See attributes(5) for descriptions of the following attributes:
69
70
71
72
73       ┌─────────────────────────────┬─────────────────────────────┐
74       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
75       ├─────────────────────────────┼─────────────────────────────┤
76       │Interface stability          │Committed                    │
77       └─────────────────────────────┴─────────────────────────────┘
78

SEE ALSO

80       power.conf(4),     pm(7D),     attach(9E),    detach(9E),    power(9E),
81       pm_raise_power(9F), pm(9P), pm-components(9P)
82
83
84       Writing Device Drivers
85
86
87
88SunOS 5.11                       21 July 2004            pm_busy_component(9F)
Impressum