WinUSB Power Management
WinUSB uses the KMDF state machines for power management. Power policies are managed through calls to WinUsb_SetPowerPolicy.
In order to modify the power behavior of WinUSB, default registry settings can be modified in the device's INF. These values must be written to the device specific location in the registry by adding the values in the HW.AddReg section of the INF.
The registry values described in the following list can be specified in the device's INF to modify the power behavior.
- A value of zero, or the absence of this value indicates that the device is not allowed to wake the system.
- To allow a device to wake the system, set SystemWakeEnabled to a nonzero value. A check box in the device Properties page is automatically enabled so that the user can override the setting.
Note Changing the SystemWakeEnabled setting has no affect on selective suspend, this registry value only pertains to system suspend.
The following power policy settings that are specified in WinUsb_SetPowerPolicy's PolicyType parameter affect the behavior of selective suspend:
- AUTO_SUSPEND When set to zero, it does not set the device to selective suspend mode.
- SUSPEND_DELAY Sets the time between when the device becomes idle and when WinUSB requests the device to go into selective suspend.
The following table shows how the registry keys affect the selective suspend feature.
|DeviceIdleEnabled||This is a DWORD value. This registry value indicates whether the device is capable of being powered down when idle (Selective Suspend).
|DeviceIdleIgnoreWakeEnable||When set to a nonzero value, it suspends the device even if it does not support RemoteWake.|
|UserSetDeviceIdleEnabled||This value is a DWORD value. This registry value indicates whether a check box should be enabled in the device Properties page that allows a user to override the idle defaults. When UserSetDeviceIdleEnabled is set to a nonzero value the check box is enabled and the user can disable powering down the device when idle. A value of zero, or the absence of this value indicates that the check box is not enabled.
The UserSetDeviceIdleEnabled is ignored if DeviceIdleEnabled is not set.
|DefaultIdleState||This is a DWORD value. This registry value sets the default value of the AUTO_SUSPEND power policy setting. This registry key is used to enable or disable selective suspend when a handle is not open to the device.
This value is ignored if DeviceIdleEnabled is not set.
|DefaultIdleTimeout||This is a DWORD value. This registry value sets the default state of the SUSPEND_DELAY power policy setting.
The value indicates the amount of time in milliseconds to wait before determining that a device is idle.
All writes and control transfers force the device into the D0 power state and reset the idle timer. The IN endpoint queues are not power managed. Read requests wake the device when they are submitted. However, a device can become idle while a read request waits.
WinUSB Architecture and Modules
Choosing a driver model for developing a USB client driver
WinUSB (Winusb.sys) Installation
How to Access a USB Device by Using WinUSB Functions
WinUSB Functions for Pipe Policy Modification
Submit and view feedback for