Kernel Functions for Drivers usbcreatepmcomponents(9F)
NAME
usbcreatepmcomponents - Create power management com-
ponents for USB devices
SYNOPSIS
#include
int usbcreatepmcomponents(devinfot *dip, uintt *pwrstates);
INTERFACE LEVEL
Solaris DI specific (Solaris DI)
PARAMETERS
dip Pointer to the device's devinfo structure.
pwrstates Address into which a mask which lists power
states capable by device is returned. This is a
bitmask containing zero or more of the follow-
ing values:
USBDEVPWRMASKD0 Corresponds to USBDEVOSPWR3 or
full power.
USBDEVPWRMASKD1 Corresponds to USBDEVOSPWR2.
USBDEVPWRMASKD2 Corresponds to USBDEVOSPWR1.
USBDEVPWRMASKD3 Corresponds to USBDEVOSPWR0 or no
power.
DESCRIPTION
The usbcreatepmcomponents() function creates pm component
properties that assume the standard USB D0-D3 powerlevels
(USBDEVPWRD0 - USBDEVPWRD3). See the device's relevant
USB descriptor to determine the device's power management
capabilities and account for bus-powered devices. The
usbcreatepmcomponents() function also updates the pm-
components property in the device's devinfo structure.
Note that these USB power levels are inverse of OS power
levels. For example, USBDEVOSPWR0 and USBDEVPWRD3 are
equivalent levels corresponding to powered-down.
SunOS 5.11 Last change: 5 Jan 2004 1
Kernel Functions for Drivers usbcreatepmcomponents(9F)
RETURN VALUES
USBSUCES Power management facilities in device are
recognized by system.
USBFAILURE An error occurred.
CONTEXT
May be called from user or kernel context.
EXAMPLES
uintt *pwrstates;
/* Hook into device's power management. Enable remote wakeup. */
if (usbcreatepmcomponents(dip, pwrstates) == USBSUCES) {
usbhandleremotewakeup(dip,USBREMOTEWAKEUPENABLE);
}
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Architecture PCI-based systems
Interface stability Committed
Availability SUNWusb
SEE ALSO
attributes(5), usbclrfeature(9F),
usbregisterhotplugcbs(9F), usbgetcfg(9F),
usbgetdevdata(9F), usbhandleremotewakeup(9F),
pmidlecomponent(9F), pmbusycomponent(9F),
pmraisepower(9F), pmlowerpower(9F), usbcfgdescr(9S)
SunOS 5.11 Last change: 5 Jan 2004 2
|