Suspend and Resume Handling

Power managed stream device drivers will continue to receive notifications of system suspend and resume states through their XXX_PowerDown and XXX_PowerUp. These notifications are sent in an interrupt context just before the kernel calls OEMPowerOff. The PowerDown/PowerUp callback mechanism is independent of the Power Manager and allows legacy device drivers to function under Microsoft® Windows® CE .NET.

Device driver developers need to be aware that during an OS suspend state, the microprocessor will no longer be active. In theory the Power Manager will put all devices into a device power state that is appropriate to an OS suspend state. However, it is possible that a suspend system power state configuration or an application device power requirement may not be appropriate for a particular device. For example, an audio device might be required to stay in state D0 by a multimedia application. If the audio chip requires frequent microprocessor servicing to set up DMA buffers, the device driver developer may decide that D0 is an inappropriate state for an OS suspend state and power the device off.

Device driver developers must know what states are appropriate for their device during an OS suspend state and implement their driver accordingly. It is appropriate for driver developers to be conservative when making decisions about power management during an OS suspend state. However, not all devices should necessarily be forced off at an OS suspend state. For example, if the audio device had a line in jack and could play music independently of the microprocessor it would be appropriate for the device to remain powered during a suspend state.

If a device driver developer alters the device power state during a suspend state, it should restore it during a resume state. Such drivers should try to keep their actual behavior during an OS suspend state as transparent to the Power Manager as possible.

See Also

Device Power Management Guidelines

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.