Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Some devices can be sophisticated in how they manage their own power. Device driver developers for these devices typically want to reduce their power consumption during periods of inactivity. Reducing power consumption generally also reduces the performance of the device, so these devices also typically want to raise their performance levels when they are being actively used. Increasing performance level generally increases the power consumed.
These devices tend to dynamically raise and lower their device power states according to how often a device is used. The actual algorithm for this self-management of power is device-specific.
The Power Manager DevicePowerNotifyfunction enables driver developers to request that Power Manager adjust the power state of a device. Power Manager allows power to be adjusted, provided the requested device power state falls between the maximum and minimum values. The maximum is mandated by the system power state, and the minimum is determined by application calls to SetPowerRequirement.
When Power Manager accepts the requested power state adjustment, it updates the power state of the device, typically using IOCTL_POWER_SET. Driver implementers should observe the following guidelines when calling DevicePowerNotify:
- The device should update its power state only when it receives
an IOCTL_POWER_SET notification.
- Do not assume that a successful return code from
DevicePowerNotifyimplies that Power Manager will issue an
IOCTL_POWER_SET notification.
- Do not assume that an IOCTL_POWER_SET notification immediately
following a call to
DevicePowerNotifywas issued as a result of the call.
- Devices that are capable of waking the system when they are put
into D3 power state should not request D3 using
DevicePowerNotify.
Some devices can support more levels of power than those represented by the D0-D4 device power states. If desired, you can map multiple power levels supported by the device into each of the device power states understood by Power Manager. The device can self-manage power within each device power state group independently of Power Manager. However, it should still use the DevicePowerNotifyto transition between groups.
See Also
Reference
DevicePowerNotifySetPowerRequirement
IOCTL_POWER_SET