Share via


Implement Device Power States (Compact 7)

3/12/2014

To implement power management functionality, your driver supports transitions between predefined power states. Power Manager passes a device power state to your driver. Your driver must then map the state to its device capabilities and also perform the applicable state transition on the device. The following table describes the device power states.

Device power state Registry key Description

Full on

D0

The device is on and running. It is receiving full power from the system and is delivering full functionality to the user.

Low on

D1

The device is fully functional at a lower power or performance state than D0. The D1 state is applicable when the device is being used; however, peak performance is unnecessary, and power is at a premium.

Standby

D2

The device is partially powered and has automatic wake-up on request.

Sleep

D3

The device is partially powered and has device-initiated wake-up, if available. A device in state D3 is sleeping but capable of raising the system power state on its own. It consumes only enough power to be able to do this, which must be less than or equal to the amount of power that is used in state D2.

Off

D4

The device has no power. A device in state D4 should not be consuming any significant power. Some peripheral buses require static terminations that intrinsically use nonzero power when a device is physically connected to the bus. A device on such a bus can still support D4.

A physical device does not have to support all the device power states that are shown in the above table. The only device power state that all devices must support is the full-on state, D0. A driver that receives a request to enter a power state that its device hardware does not support enters the next available power state that it supports. For example, if Power Manager requests that your driver enter the D2 state and your device does not support D2, your driver can instead transition the device to the state D3 or D4. This transition is possible if Power Manager supports one of these states. If Power Manager requests that your device enter the D3 state but your device cannot wake the system, we recommend that your driver enters the D4 state by turning off the power instead of staying in standby mode. These rules are intended to simplify device driver implementation.

Power Manager maps system power states to the corresponding device power states. For example, if a device supports only power states D0 and D4, Power Manager does not immediately request that the device enter the D4 power state when it transitions from the full-on power state. Power Manager waits until the system enters a system power state in which D3 or D4 is configured as the maximum device power state for that device. If D0, D1, or D2 is configured as the maximum power state, Power Manager keeps the device at D0.

When your device driver starts, it puts the device in the full-on state D0. Before your device driver is unloaded, it should put the device into D4 (the power off state), if possible. If your device enters another device power state at startup, it can issue a DevicePowerNotify request while processing IOCTL_POWER_CAPABILITIES.

For more information about device power states, see CEDEVICE_POWER_STATE. For more information about IOCTL commands that Power Manager issues to your device driver, see Power Management I/O Controls.

See Also

Concepts

Support Power Management