PoFxReportDevicePoweredOn routine

The PoFxReportDevicePoweredOn routine notifies the power management framework (PoFx) that the device completed the requested transition to the D0 (fully on) power state.

Syntax


VOID PoFxReportDevicePoweredOn(
  _In_ POHANDLE Handle
);

Parameters

Handle [in]

A handle that represents the registration of the device with the power management framework (PoFx). The device driver previously received this handle from the PoFxRegisterDevice routine.

Return value

None.

Remarks

The driver for a registered device must call PoFxReportDevicePoweredOn after either of the following occurrences:

  • PoFx calls the driver's DevicePowerRequiredCallback callback routine to notify the driver that the device must enter the D0 power state.
  • PoFx sends the driver an S0 IRP (an IRP_MN_SET_POWER request) to notify the driver of a pending system transition to the S0 power state.

In response to either occurrence, the driver sends D0 IRP (an IRP_MN_SET_POWER request) down its device stack to initiate a transition to the D0 power state, if the device is not already in the D0 state. After the driver completes (and all lower drivers complete) the transition to the D0 state, the driver calls PoFxReportDevicePoweredOn to notify PoFx.

Each time the DevicePowerRequiredCallback routine is called, the driver must respond by calling PoFxReportDevicePoweredOn. The PoFxReportDevicePoweredOn call can occur either during or after the DevicePowerRequiredCallback call. The driver must call PoFxReportDevicePoweredOn regardless of whether no D0 IRP is required, the D0 IRP request fails, or the dispatched D0 IRP succeeds or fails.

During a system transition to the S0 state, PoFx sends the driver an IRP_MN_SET_POWER request to notify the driver of the pending S0 transition. In response, the driver must complete this request as soon as possible, switch the device to the D0 power state, and call PoFxReportDevicePoweredOn. For more information, see Handling a System Set-Power IRP in a Device Power Policy Owner.

On entry to PoFxReportDevicePoweredOn, the device might be in an uninitialized D0 power state in which all of the components in the device are turned on. In response to the PoFxReportDevicePoweredOn call, PoFx configures the device in an initialized D0 state. During this configuration, PoFx switches as many components as it can to low-power Fx power states.

Requirements

Target platform

Universal

Version

Available starting with Windows 8.

Header

Wdm.h

Library

Ntoskrnl.lib

DLL

Ntoskrnl.exe

IRQL

<= DISPATCH_LEVEL

See also

DevicePowerRequiredCallback
IRP_MN_SET_POWER
PoFxRegisterDevice

 

 

Send comments about this topic to Microsoft

Show: