WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfdevice.h

typedef struct _WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS {
  ULONG                                 Size;
  DEVICE_POWER_STATE                    DxState;
  WDF_POWER_POLICY_SX_WAKE_USER_CONTROL UserControlOfWakeSettings;
  WDF_TRI_STATE                         Enabled;
  BOOLEAN                               ArmForWakeIfChildrenAreArmedForWake;
  BOOLEAN                               IndicateChildWakeOnParentWake;
} WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS, *PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS;
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ns-wdfdevice-_wdf_device_power_policy_wake_settings)

_WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS structure

Description

[Applies to KMDF and UMDF]

The WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS structure contains driver-supplied information about a device's ability to wake itself and the system, when both are in a low-power state.

Members

Size

The size, in bytes, of this structure.

DxState

A DEVICE_POWER_STATE-typed enumerator that identifies the low device power state that the device will enter when the system power state drops to a wakeable low-power state. The value of DxState cannot be PowerDeviceD0. DEVICE_POWER_STATE values are defined in wdm.h.

UserControlOfWakeSettings

A WDF_POWER_POLICY_SX_WAKE_USER_CONTROL-typed enumerator that indicates whether users have the ability to modify the device's wake settings.

Enabled

A WDF_TRI_STATE-typed enumerator that indicates whether the device can wake the system (that is, restore the system to S0) when the system is in a low-power state. This member can have one of the following values:

WdfTrue - Waking the system is enabled.

WdfFalse - Waking the system is disabled.

WdfUseDefault - Waking the system is initially enabled by default; but if the UserControlOfWakeSettings member is set to WakeAllowUserControl, the user's setting or driver's INF file overrides the initial value.

If waking the system is enabled and the system is about to enter a low-power state, the framework calls the driver's EvtDeviceArmWakeFromSx or EvtDeviceArmWakeFromSxWithReason callback function before the device enters a low-power state.

ArmForWakeIfChildrenAreArmedForWake

A Boolean value that, if set to TRUE, indicates that a parent device's ability to wake itself and the system should be enabled when this ability is enabled for the device's child devices. For more information, see the following Remarks section. This member is available in version 1.7 and later versions of KMDF.

IndicateChildWakeOnParentWake

A Boolean value that, if set to TRUE, indicates that the framework will provide wake-up status to child devices if a parent device detects a wake-up signal. For more information, see the following Remarks section. This member is available in version 1.7 and later versions of KMDF.

Remarks

The WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS structure is used as input to WdfDeviceAssignSxWakeSettings.

To initialize its WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS structure, your driver should call WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_INIT.

The first time a driver calls WdfDeviceAssignSxWakeSettings, the following actions occur:

During subsequent calls to WdfDeviceAssignSxWakeSettings, the framework does not store the value of the UserControlOfWakeSettings member. In other words, the framework performs the following steps the first time the driver calls WdfDeviceAssignSxWakeSettings but not during later calls:

The following rules apply to the value that you specify for the DxState member:

For information about registry entries that control a device's wake capabilities, see User Control of Device Idle and Wake Behavior.

If the device that the WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS structure describes is a parent device, the driver for the parent device can use the ArmForWakeIfChildrenAreArmedForWake and IndicateChildWakeOnParentWake members as follows:

For more information about how to support a device's wake ability, see Supporting System Wake-Up.

See also

EvtDeviceArmWakeFromSx

EvtDeviceArmWakeFromSxWithReason

EvtDeviceWakeFromSxTriggered

WDF_DEVICE_POWER_CAPABILITIES

WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_INIT

WDF_POWER_POLICY_SX_WAKE_USER_CONTROL

WdfDeviceAssignSxWakeSettings

WdfDeviceIndicateWakeStatus