aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/power/runtime_pm.txt
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-03 15:49:52 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-03 15:49:52 -0400
commit45f0a85c8258741d11bda25c0a5669c06267204a (patch)
treea618cce0583426a5c7f53f56cf19139a6f9733ce /Documentation/power/runtime_pm.txt
parentcd38ca854de15b26eb91009137cbe157d8a8e773 (diff)
PM / Runtime: Rework the "runtime idle" helper routine
The "runtime idle" helper routine, rpm_idle(), currently ignores return values from .runtime_idle() callbacks executed by it. However, it turns out that many subsystems use pm_generic_runtime_idle() which checks the return value of the driver's callback and executes pm_runtime_suspend() for the device unless that value is not 0. If that logic is moved to rpm_idle() instead, pm_generic_runtime_idle() can be dropped and its users will not need any .runtime_idle() callbacks any more. Moreover, the PCI, SCSI, and SATA subsystems' .runtime_idle() routines, pci_pm_runtime_idle(), scsi_runtime_idle(), and ata_port_runtime_idle(), respectively, as well as a few drivers' ones may be simplified if rpm_idle() calls rpm_suspend() after 0 has been returned by the .runtime_idle() callback executed by it. To reduce overall code bloat, make the changes described above. Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Tested-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Kevin Hilman <khilman@linaro.org> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Alan Stern <stern@rowland.harvard.edu>
Diffstat (limited to 'Documentation/power/runtime_pm.txt')
-rw-r--r--Documentation/power/runtime_pm.txt5
1 files changed, 0 insertions, 5 deletions
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 6c9f5d9aa115..6c470c71ba27 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -660,11 +660,6 @@ Subsystems may wish to conserve code space by using the set of generic power
660management callbacks provided by the PM core, defined in 660management callbacks provided by the PM core, defined in
661driver/base/power/generic_ops.c: 661driver/base/power/generic_ops.c:
662 662
663 int pm_generic_runtime_idle(struct device *dev);
664 - invoke the ->runtime_idle() callback provided by the driver of this
665 device, if defined, and call pm_runtime_suspend() for this device if the
666 return value is 0 or the callback is not defined
667
668 int pm_generic_runtime_suspend(struct device *dev); 663 int pm_generic_runtime_suspend(struct device *dev);
669 - invoke the ->runtime_suspend() callback provided by the driver of this 664 - invoke the ->runtime_suspend() callback provided by the driver of this
670 device and return its result, or return -EINVAL if not defined 665 device and return its result, or return -EINVAL if not defined