NAME | DESCRIPTION | SEE ALSO
There is a property, pm-hardware-state, that may be used to influence the behavior of the power management portion of the DDI framework. Its syntax and interpretation is described below.
Note that this property is only interpreted by the system immediately after the device has successfully attached. Changes in the property made by the driver after the driver has attached will not be recognized.
pm-hardware-state is a string-valued property. The existence of the pm-hardware-state property indicates that a device needs special handling by the power management framework with regard to its hardware state.
If the value of this property is needs-suspend-resume, the device has a hardware state that cannot be deduced by the framework. The framework definition of a device with hardware state is one with a reg property. Some drivers, such as SCSI disk and tape drivers, have no reg property but manage devices with "remote" hardware. Such a device must have a pm-hardware-state property with a value of needs-suspend-resume in order for the system to identify it as needing a call to its detach(9E) entry point with command DDI_SUSPEND or DDI_PM_SUSPEND before power is removed from the device, and a call to attach(9E) with command DDI_RESUME or DDI_PM_RESUME after power is restored.
A value of no-suspend-resume indicates that, in spite of the existence of a reg property, a device has no hardware state that needs saving and restoring. A device exporting this property will not have its detach() entry point called with command DDI_SUSPEND or DDI_PM_SUSPEND before power is removed from the device, nor will its attach() entry point be called with command DDI_RESUME after power is restored to the device.
A value of parental-suspend-resume indicates that the device does not implement the detach() DDI_SUSPEND or DDI_PM_SUSPEND semantics, nor the attach() DDI_RESUME or DDI_PM_RESUME semantics, but that a call should be made up the device tree by the framework to effect the saving and/or restoring of hardware state for this device.
Because the sd driver drives a device with no reg property, but needs to know when power will be removed from its controller, it exports a property with the name pm-hardware-state and the value needs-suspend-resume. On an x86 system with Advanced Power Management (APM) BIOS support, a device that can have its state saved by the APM BIOS can create a pm-hardware-state property with the value parental-suspend-resume, and requests to save the state of the device will be passed up the device tree to the platform-specific power management driver that will call into the BIOS.
power.conf(4), pm(7D), attach(9E), detach(9E), pm_busy_component(9F), pm_create_components(9F), pm_destroy_components(9F), pm_idle_component(9F)
NAME | DESCRIPTION | SEE ALSO