Partager via


Device Power Self-Management (Windows CE 5.0)

Send Feedback

Some devices can be sophisticated in how they manage their own power. Device driver developers for these devices will typically want to reduce their power consumption during periods of inactivity. Reducing power consumption will generally also reduce 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 will 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's DevicePowerNotify API allows driver developers to request that the Power Manager adjust their device's power state. The Power Manager will permit power to be adjusted, provided that the requested device power state falls between the maximum and minimum values. The maximum value is mandated by the system power state and the minimum value is determined by application calls to SetPowerRequirement.

When the Power Manager decides to accept a device's requested power state adjustment, it will update the device's power state using the device API, typically using IOCTL_POWER_SET. Driver implementers should observe the following guidelines when calling DevicePowerNotify:

  • The device should not update its power state if the DevicePowerNotify call succeeds, only when it receives an IOCTL_POWER_SET.
  • The driver developer should not assume that a successful return code from DevicePowerNotify implies that the Power Manager will issue an IOCTL_POWER_SET.
  • The driver developer should not assume that an IOCTL_POWER_SET immediately following a DevicePowerNotify was issued as a result of the call.
  • Devices that are capable of waking the system when they are put into D3 should not request D3 using DevicePowerNotify.

Some devices are capable of supporting more than levels of power than are represented by the D0 through D4 device power states. If desired, driver developers for such devices can map multiple power levels actually supported by the device into each of the device power states understood by the Power Manager. The device is free to self-manage power within each device power state group independently of the Power Manager. However, it should still use the DevicePowerNotify to transition between groups.

See Also

Device Power Management Guidelines | Self-Management Example | DevicePowerNotify | SetPowerRequirement | IOCTL_POWER_SET

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.