The ddi_dev_is_needed() function is obsolete and
will be removed in a future release. It is recommended that device drivers
use pm_raise_power(9F) and pm_lower_power(9F).
The ddi_dev_is_needed() function informs the system
that a device component is needed at the specified power level. The level argument must be non-zero.
This function sets a component to the required
level and sets all devices which depend on this to their normal power
levels. If component 0 of a device using original
Power Management interfaces (calls pm_create_components(9F)) is at power level 0, the ddi_dev_is_needed() call will result in component 0 being returned to normal power
and the device being resumed via attach(9E)
before ddi_dev_is_needed() returns.
The state of the device should be examined before each physical access.
The ddi_dev_is_needed() function should be called to
set a component to the required power level if the
operation to be performed requires the component to be at a power level
other than its current level.
The ddi_dev_is_needed() function might cause re-entry
of the driver. Deadlock may result if driver locks are held across the call
to ddi_dev_is_needed().
|