diff options
Diffstat (limited to 'Documentation/power/runtime_pm.txt')
-rw-r--r-- | Documentation/power/runtime_pm.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 5f96daf8566a..e1bee8a4aaac 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
@@ -2,6 +2,7 @@ Runtime Power Management Framework for I/O Devices | |||
2 | 2 | ||
3 | (C) 2009-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. | 3 | (C) 2009-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. |
4 | (C) 2010 Alan Stern <stern@rowland.harvard.edu> | 4 | (C) 2010 Alan Stern <stern@rowland.harvard.edu> |
5 | (C) 2014 Intel Corp., Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ||
5 | 6 | ||
6 | 1. Introduction | 7 | 1. Introduction |
7 | 8 | ||
@@ -444,6 +445,10 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: | |||
444 | bool pm_runtime_status_suspended(struct device *dev); | 445 | bool pm_runtime_status_suspended(struct device *dev); |
445 | - return true if the device's runtime PM status is 'suspended' | 446 | - return true if the device's runtime PM status is 'suspended' |
446 | 447 | ||
448 | bool pm_runtime_suspended_if_enabled(struct device *dev); | ||
449 | - return true if the device's runtime PM status is 'suspended' and its | ||
450 | 'power.disable_depth' field is equal to 1 | ||
451 | |||
447 | void pm_runtime_allow(struct device *dev); | 452 | void pm_runtime_allow(struct device *dev); |
448 | - set the power.runtime_auto flag for the device and decrease its usage | 453 | - set the power.runtime_auto flag for the device and decrease its usage |
449 | counter (used by the /sys/devices/.../power/control interface to | 454 | counter (used by the /sys/devices/.../power/control interface to |
@@ -644,6 +649,18 @@ place (in particular, if the system is not waking up from hibernation), it may | |||
644 | be more efficient to leave the devices that had been suspended before the system | 649 | be more efficient to leave the devices that had been suspended before the system |
645 | suspend began in the suspended state. | 650 | suspend began in the suspended state. |
646 | 651 | ||
652 | To this end, the PM core provides a mechanism allowing some coordination between | ||
653 | different levels of device hierarchy. Namely, if a system suspend .prepare() | ||
654 | callback returns a positive number for a device, that indicates to the PM core | ||
655 | that the device appears to be runtime-suspended and its state is fine, so it | ||
656 | may be left in runtime suspend provided that all of its descendants are also | ||
657 | left in runtime suspend. If that happens, the PM core will not execute any | ||
658 | system suspend and resume callbacks for all of those devices, except for the | ||
659 | complete callback, which is then entirely responsible for handling the device | ||
660 | as appropriate. This only applies to system suspend transitions that are not | ||
661 | related to hibernation (see Documentation/power/devices.txt for more | ||
662 | information). | ||
663 | |||
647 | The PM core does its best to reduce the probability of race conditions between | 664 | The PM core does its best to reduce the probability of race conditions between |
648 | the runtime PM and system suspend/resume (and hibernation) callbacks by carrying | 665 | the runtime PM and system suspend/resume (and hibernation) callbacks by carrying |
649 | out the following operations: | 666 | out the following operations: |