PO_FX_DIRECTED_POWER_UP_CALLBACK callback function (wdm.h)

The PO_FX_DIRECTED_POWER_UP_CALLBACK callback function is implemented by the client driver to handle driver-specific power up activities on behalf of DFx (Directed PoFx).

Syntax

PO_FX_DIRECTED_POWER_UP_CALLBACK PoFxDirectedPowerUpCallback;

void PoFxDirectedPowerUpCallback(
  PVOID Context,
  ULONG Flags
)
{...}

Parameters

Context

Supplies a pointer to the context passed in to PoFxRegisterDevice.

Flags

Reserved for future use.

Return value

None

Remarks

WDM drivers that register with PoFx for runtime idle power management support need to implement this callback to add DFx support.

Register your implementation of this callback function by setting the appropriate member of the PO_FX_DEVICE_V3 structure and then calling PoFxRegisterDevice.

This callback is invoked when the system determines the device needs to power up after having previously being powered down in the PO_FX_DIRECTED_POWER_DOWN_CALLBACK callback function. The device may need to be powered up when the system exits Modern Standby, activators start to run, or a hardware-initiated wake occurs.

When this callback is invoked, the driver typically performs the following high-level tasks:

  • Request a D0 IRP to power up the device.

  • After the D0 IRP completes, call PoFxReportDevicePoweredOn.

  • Unblock I/O queues and start processing requests normally.

Once the driver completes the Directed power up call, it can resume runtime-idle (RTD3) behavior.

The contract is very similar to S0, although no S-IRPs are involved.

Note that if a device hierarchy is involved, the directed power framework asks the child devices to power down before the parent device. For a given parent device, direct children (ones enumerated by the parent) and indirect children due to power relations are considered.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1903
Header wdm.h (include Wdm.h)

See also

Introduction to the Directed Power Management Framework

PO_FX_DIRECTED_POWER_DOWN_CALLBACK