aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/power/devices.txt41
1 files changed, 14 insertions, 27 deletions
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt
index ff923fe67d98..64565aac6e40 100644
--- a/Documentation/power/devices.txt
+++ b/Documentation/power/devices.txt
@@ -520,33 +520,20 @@ Support for power domains is provided through the pwr_domain field of struct
520device. This field is a pointer to an object of type struct dev_power_domain, 520device. This field is a pointer to an object of type struct dev_power_domain,
521defined in include/linux/pm.h, providing a set of power management callbacks 521defined in include/linux/pm.h, providing a set of power management callbacks
522analogous to the subsystem-level and device driver callbacks that are executed 522analogous to the subsystem-level and device driver callbacks that are executed
523for the given device during all power transitions, in addition to the respective 523for the given device during all power transitions, instead of the respective
524subsystem-level callbacks. Specifically, the power domain "suspend" callbacks 524subsystem-level callbacks. Specifically, if a device's pm_domain pointer is
525(i.e. ->runtime_suspend(), ->suspend(), ->freeze(), ->poweroff(), etc.) are 525not NULL, the ->suspend() callback from the object pointed to by it will be
526executed after the analogous subsystem-level callbacks, while the power domain 526executed instead of its subsystem's (e.g. bus type's) ->suspend() callback and
527"resume" callbacks (i.e. ->runtime_resume(), ->resume(), ->thaw(), ->restore, 527anlogously for all of the remaining callbacks. In other words, power management
528etc.) are executed before the analogous subsystem-level callbacks. Error codes 528domain callbacks, if defined for the given device, always take precedence over
529returned by the "suspend" and "resume" power domain callbacks are ignored. 529the callbacks provided by the device's subsystem (e.g. bus type).
530 530
531Power domain ->runtime_idle() callback is executed before the subsystem-level 531The support for device power management domains is only relevant to platforms
532->runtime_idle() callback and the result returned by it is not ignored. Namely, 532needing to use the same device driver power management callbacks in many
533if it returns error code, the subsystem-level ->runtime_idle() callback will not 533different power domain configurations and wanting to avoid incorporating the
534be called and the helper function rpm_idle() executing it will return error 534support for power domains into subsystem-level callbacks, for example by
535code. This mechanism is intended to help platforms where saving device state 535modifying the platform bus type. Other platforms need not implement it or take
536is a time consuming operation and should only be carried out if all devices 536it into account in any way.
537in the power domain are idle, before turning off the shared power resource(s).
538Namely, the power domain ->runtime_idle() callback may return error code until
539the pm_runtime_idle() helper (or its asychronous version) has been called for
540all devices in the power domain (it is recommended that the returned error code
541be -EBUSY in those cases), preventing the subsystem-level ->runtime_idle()
542callback from being run prematurely.
543
544The support for device power domains is only relevant to platforms needing to
545use the same subsystem-level (e.g. platform bus type) and device driver power
546management callbacks in many different power domain configurations and wanting
547to avoid incorporating the support for power domains into the subsystem-level
548callbacks. The other platforms need not implement it or take it into account
549in any way.
550 537
551 538
552Device Low Power (suspend) States 539Device Low Power (suspend) States