2 .\" Copyright (c) 2004, Sun Microsystems, Inc., All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH USB_CREATE_PM_COMPONENTS 9F "Jan 5, 2004"
8 usb_create_pm_components \- Create power management components for USB devices
12 #include <sys/usb/usba.h>
16 \fBint\fR \fBusb_create_pm_components\fR(\fBdev_info_t *\fR\fIdip\fR, \fBuint_t *\fR\fIpwrstates\fR);
22 Solaris DDI specific (Solaris DDI)
30 Pointer to the device's \fBdev_info\fR structure.
39 Address into which a mask which lists power states capable by device is
40 returned. This is a bitmask containing zero or more of the following values:
46 \fBUSB_DEV_PWRMASK_D0\fR
49 Corresponds to USB_DEV_OS_PWR_3 or full power.
55 \fBUSB_DEV_PWRMASK_D1\fR
58 Corresponds to USB_DEV_OS_PWR_2.
64 \fBUSB_DEV_PWRMASK_D2\fR
67 Corresponds to USB_DEV_OS_PWR_1.
73 \fBUSB_DEV_PWRMASK_D3\fR
76 Corresponds to USB_DEV_OS_PWR_0 or no power.
82 The \fBusb_create_pm_components()\fR function creates pm component properties
83 that assume the standard USB D0-D3 powerlevels (USB_DEV_PWR_D0 -
84 USB_DEV_PWR_D3). See the device's relevant USB descriptor to determine the
85 device's power management capabilities and account for bus-powered devices. The
86 \fBusb_create_pm_components()\fR function also updates the pm-components
87 property in the device's dev_info structure.
90 Note that these USB power levels are inverse of OS power levels. For example,
91 USB_DEV_OS_PWR_0 and USB_DEV_PWR_D3 are equivalent levels corresponding to
100 Power management facilities in device are recognized by system.
115 May be called from user or kernel context.
122 /* Hook into device's power management. Enable remote wakeup. */
123 if (usb_create_pm_components(dip, pwrstates) == USB_SUCCESS) {
124 usb_handle_remote_wakeup(dip,USB_REMOTE_WAKEUP_ENABLE);
133 See \fBattributes\fR(5) for descriptions of the following attributes:
141 ATTRIBUTE TYPE ATTRIBUTE VALUE
143 Architecture PCI-based systems
145 Interface stability Committed
151 \fBattributes\fR(5), \fBusb_clr_feature\fR(9F),
152 \fBusb_register_hotplug_cbs\fR(9F), \fBusb_get_cfg\fR(9F),
153 \fBusb_get_dev_data\fR(9F), \fBusb_handle_remote_wakeup\fR(9F),
154 \fBpm_idle_component\fR(9F), \fBpm_busy_component\fR(9F),
155 \fBpm_raise_power\fR(9F), \fBpm_lower_power\fR(9F), \fBusb_cfg_descr\fR(9S)