1usb_create_pm_components(9KFe)rnel Functions for Driveurssb_create_pm_components(9F)
2
3
4

NAME

6       usb_create_pm_components  -  Create power management components for USB
7       devices
8

SYNOPSIS

10       #include <sys/usb/usba.h>
11
12
13
14       int usb_create_pm_components(dev_info_t *dip, uint_t *pwrstates);
15
16

INTERFACE LEVEL

18       Solaris DDI specific (Solaris DDI)
19

PARAMETERS

21       dip          Pointer to the device's dev_info structure.
22
23
24       pwrstates    Address into which a mask which lists power states capable
25                    by  device  is returned. This is a bitmask containing zero
26                    or more of the following values:
27
28
29       USB_DEV_PWRMASK_D0    Corresponds to USB_DEV_OS_PWR_3 or full power.
30
31
32       USB_DEV_PWRMASK_D1    Corresponds to USB_DEV_OS_PWR_2.
33
34
35       USB_DEV_PWRMASK_D2    Corresponds to USB_DEV_OS_PWR_1.
36
37
38       USB_DEV_PWRMASK_D3    Corresponds to USB_DEV_OS_PWR_0 or no power.
39
40

DESCRIPTION

42       The usb_create_pm_components() function creates pm component properties
43       that  assume  the  standard  USB  D0-D3  powerlevels  (USB_DEV_PWR_D0 -
44       USB_DEV_PWR_D3). See the device's relevant USB descriptor to  determine
45       the  device's power management capabilities and account for bus-powered
46       devices. The usb_create_pm_components() function also updates  the  pm-
47       components property in the device's dev_info structure.
48
49
50       Note  that  these  USB power levels are inverse of OS power levels. For
51       example, USB_DEV_OS_PWR_0 and USB_DEV_PWR_D3 are equivalent levels cor‐
52       responding to powered-down.
53

RETURN VALUES

55       USB_SUCCESS    Power  management facilities in device are recognized by
56                      system.
57
58
59       USB_FAILURE    An error occurred.
60
61

CONTEXT

63       May be called from user or kernel context.
64

EXAMPLES

66            uint_t *pwrstates;
67
68             /* Hook into device's power management.  Enable remote wakeup. */
69             if (usb_create_pm_components(dip, pwrstates) == USB_SUCCESS) {
70                     usb_handle_remote_wakeup(dip,USB_REMOTE_WAKEUP_ENABLE);
71             }
72
73
74

ATTRIBUTES

76       See attributes(5) for descriptions of the following attributes:
77
78
79
80
81       ┌─────────────────────────────┬─────────────────────────────┐
82       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
83       ├─────────────────────────────┼─────────────────────────────┤
84       │Architecture                 │PCI-based systems            │
85       ├─────────────────────────────┼─────────────────────────────┤
86       │Interface stability          │Committed                    │
87       ├─────────────────────────────┼─────────────────────────────┤
88       │Availability                 │SUNWusb                      │
89       └─────────────────────────────┴─────────────────────────────┘
90

SEE ALSO

92       attributes(5),    usb_clr_feature(9F),    usb_register_hotplug_cbs(9F),
93       usb_get_cfg(9F),   usb_get_dev_data(9F),  usb_handle_remote_wakeup(9F),
94       pm_idle_component(9F),    pm_busy_component(9F),    pm_raise_power(9F),
95       pm_lower_power(9F), usb_cfg_descr(9S)
96
97
98
99SunOS 5.11                        5 Jan 2004      usb_create_pm_components(9F)
Impressum