DeviceState

The DeviceState member of DEVICE_CAPABILITIES is an array of DEVICE_POWER_STATE values that are indexed by SYSTEM_POWER_STATE values ranging from PowerSystemWorking to PowerSystemShutdown. Each element of the array contains the maximum (highest-powered) device power state that the device can support for the system power state denoted by the index, or PowerDeviceUnspecified if the system power state is not supported.

For example, on a system that supports only S0, S4, and S5 system power states, the DeviceState array for a device that supports only the D0 and D3 states contains the values shown in the following table.

DeviceState element Value

DeviceState[PowerSystemWorking]

PowerDeviceD0

DeviceState[PowerSystemSleeping1]

PowerDeviceUnspecified

DeviceState[PowerSystemSleeping2]

PowerDeviceUnspecified

DeviceState[PowerSystemSleeping3]

PowerDeviceUnspecified

DeviceState[PowerSystemHibernate]

PowerDeviceD3

DeviceState[PowerSystemShutdown]

PowerDeviceD3

On a system that supports all of the system power states, the following table lists the values that the array would contain for a device that must be in the D2 state or lower whenever the system goes to any intermediate sleep state and in the D3 state when the system hibernates.

DeviceState element Value

DeviceState[PowerSystemWorking]

PowerDeviceD0

DeviceState[PowerSystemSleeping1]

PowerDeviceD2

DeviceState[PowerSystemSleeping2]

PowerDeviceD2

DeviceState[PowerSystemSleeping3]

PowerDeviceD2

DeviceState[PowerSystemHibernate]

PowerDeviceD3

DeviceState[PowerSystemShutdown]

PowerDeviceD3

Note that the entries in the DeviceState array signify the highest device power state that the device can support for the corresponding system power state. In the preceding example, the device could be in state D3 for any system power state, state D2 for system power states PowerSystemWorking through PowerSystemSleeping3, and state D1 for system state PowerSystemWorking.

The bus driver or ACPI filter sets these values based on the capabilities of the parent device node.

As a general rule, higher-level drivers should not change these values. However, in the rare circumstances in which such a change is necessary, a driver can specify a lower (less-powered) state than the bus driver or ACPI filter originally returned. For example, assume that DeviceState[PowerSystemSleeping1] maps to PowerDeviceD2, as in the table above. A driver can change this value to PowerDeviceD3, but not to PowerDeviceD1 or PowerDeviceD0.