1power(9E)                     Driver Entry Points                    power(9E)
2
3
4

NAME

6       power - power a device attached to the system
7

SYNOPSIS

9       #include <sys/ddi.h>
10       #include <sys/sunddi.h>
11
12
13
14       int prefixpower(dev_info_t *dip, int component, int level);
15
16

INTERFACE LEVEL

18       Solaris  DDI  specific  (Solaris DDI). This entry point is required. If
19       the driver writer does not supply this entry point, the value NULL must
20       be used in the cb_ops(9S) structure instead.
21

PARAMETERS

23       dip          Pointer to the device's dev_info structure.
24
25
26       component    Component of the driver to be managed.
27
28
29       level        Desired component power level.
30
31

DESCRIPTION

33       The  power(9E)  function  is the device-specific Power Management entry
34       point. This function is called when the system wants the driver to  set
35       the power level of component to level.
36
37
38       The  level argument is the driver-defined power level to which the com‐
39       ponent needs to be set. Except for power level 0, which is  interpreted
40       by  the framework to mean "powered off," the interpretation of level is
41       entirely up to the driver.
42
43
44       The component argument is the component of the device to be  power-man‐
45       aged. The interpretation of component is entirely up to the driver.
46
47
48       When a requested power transition would cause the device to lose state,
49       the driver must save  the  state  of  the  device  in  memory.  When  a
50       requested  power  transition  requires state to be restored, the driver
51       must restore that state.
52
53
54       If a requested power transition for one component requires another com‐
55       ponent  to  change  power  state before it can be completed, the driver
56       must call pm_raise_power(9F) to get the other  component  changed,  and
57       the power(9E) entry point must support being re-entered.
58
59
60       If the system requests an inappropriate power transition for the device
61       (for example, a request to power down a device which  has  just  become
62       busy),  then  the  power  level  should not be changed and power should
63       return DDI_FAILURE.
64

RETURN VALUES

66       The power() function returns:
67
68       DDI_SUCCESS    Successfully set the power to the requested level.
69
70
71       DDI_FAILURE    Failed to set the power to the requested level.
72
73

CONTEXT

75       The power() function is called from user or kernel context only.
76

ATTRIBUTES

78       See attributes(5) for descriptions of the following attributes:
79
80
81
82
83       ┌─────────────────────────────┬─────────────────────────────┐
84       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
85       ├─────────────────────────────┼─────────────────────────────┤
86       │Interface stability          │Committed                    │
87       └─────────────────────────────┴─────────────────────────────┘
88

SEE ALSO

90       attach(9E), detach(9E),  pm_busy_component(9F),  pm_idle_component(9F),
91       pm_raise_power(9F), cb_ops(9S)
92
93
94       Writing Device Drivers
95
96
97       Using Power Management
98
99
100
101SunOS 5.11                        12 Dec 2003                        power(9E)
Impressum