Skip to contentSkip to conversation

PM / runtime: Document new pm_runtime_set_suspended constraint

PATCH In review Johan Hovold 3 participants 3 messages Jul 24, 2017 – Jul 28, 2017 Suspend to RAM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PM / runtime: Document new pm_runtime_set_suspended constraint

Since commit a8636c89648a ("PM / Runtime: Don't allow to suspend a device with an active child") it is no longer permitted to set RPM_SUSPENDED state for a device with active children unless power.ignore_children is set.

Update the documentation to reflect this.

Cc Alan Stern <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Ulf Hansson <[email protected]>
---
 Documentation/power/runtime_pm.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/power/runtime_pm.txt +2 -1
index 0fde3dcf077a..625549d4c74a 100644
@@ -435,7 +435,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
       PM status to 'suspended' and update its parent's counter of 'active'
       children as appropriate (it is only valid to use this function if
       'power.runtime_error' is set or 'power.disable_depth' is greater than
-      zero)
+      zero); it will fail and return an error code if the device has a child
+      which is active and the 'power.ignore_children' flag is unset
 
   bool pm_runtime_active(struct device *dev);
     - return true if the device's runtime PM status is 'active' or its
Signature · 1 line
2.13.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Johan Hovold

Since commit a8636c89648a ("PM / Runtime: Don't allow to suspend a device with an active child") it is no longer permitted to set RPM_SUSPENDED state for a device with active children unless power.ignore_children is set.

Update the documentation to reflect this.

Cc Alan Stern <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Ulf Hansson <[email protected]>

Kind regards
Uffe

Quoted 21 lines
---
 Documentation/power/runtime_pm.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/power/runtime_pm.txt +2 -2
index 0fde3dcf077a..625549d4c74a 100644
@@ -435,7 +435,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
       PM status to 'suspended' and update its parent's counter of 'active'
       children as appropriate (it is only valid to use this function if
       'power.runtime_error' is set or 'power.disable_depth' is greater than
-      zero)
+      zero); it will fail and return an error code if the device has a child
+      which is active and the 'power.ignore_children' flag is unset
 
   bool pm_runtime_active(struct device *dev);
     - return true if the device's runtime PM status is 'active' or its
--

2.13.3

#2 lore raw
Quoted 6 lines · Ulf Hansson
Quoted 5 lines · Johan Hovold

Since commit a8636c89648a ("PM / Runtime: Don't allow to suspend a device with an active child") it is no longer permitted to set RPM_SUSPENDED state for a device with active children unless power.ignore_children is set.

Quoted 8 lines
Quoted 6 lines

Update the documentation to reflect this.

Cc Alan Stern <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Ulf Hansson <[email protected]>

Patch applied, thanks!