Contents

changePowerStateTo

Sets a driver's power state.

Declaration

IOReturn changePowerStateTo(
 unsigned longordinal );

Parameters

  • ordinal:

    The number of the desired power state in the power state array.

Return Value

A return code that can be ignored by the caller.

Overview

This function is one of several that are used to set a driver's power state. In most circumstances, however, you should call changePowerStateToPriv instead. Calls to changePowerStateTo, changePowerStateToPriv, and a driver's power children all affect the power state of a driver. For legacy design reasons, they have overlapping functionality. Although you should call changePowerStateToPriv to change your device's power state, you might need to call changePowerStateTo in the following circumstances:

  • If a driver will be using changePowerStateToPriv to change its power state, it should call changePowerStateTo(0) in its start routine to eliminate the influence changePowerStateTo has on power state calculations.

  • Call changePowerStateTo in conjunction with setIdleTimerPeriod and activityTickle to idle a driver into a low power state. For a driver with 3 power states, for example, changePowerStateTo(1) sets a minimum level of power state 1, such that the idle timer period may not set your device's power any lower than state 1.

See Also

Miscellaneous