linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] PM / Runtime: dev_pm_info.runtime_error is signed
@ 2014-03-24 20:31 Geert Uytterhoeven
  2014-03-24 20:31 ` [PATCH 2/5] PM / Runtime: Split line longer than 80 characters Geert Uytterhoeven
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-03-24 20:31 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Pavel Machek
  Cc: Ben Dooks, linux-pm, linux-kernel, Geert Uytterhoeven

From: Geert Uytterhoeven <geert+renesas@glider.be>

dev_pm_info.runtime_error has always been a signed int, to store a signed
error code. Correct the documentation.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 Documentation/power/runtime_pm.txt |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index b6ce00b2be9a..a5683a5662cb 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -232,7 +232,7 @@ defined in include/linux/pm.h:
       equal to zero); the initial value of it is 1 (i.e. runtime PM is
       initially disabled for all devices)
 
-  unsigned int runtime_error;
+  int runtime_error;
     - if set, there was a fatal error (one of the callbacks returned error code
       as described in Section 2), so the helper funtions will not work until
       this flag is cleared; this is the error code returned by the failing
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/5] PM / Runtime: Split line longer than 80 characters
  2014-03-24 20:31 [PATCH 1/5] PM / Runtime: dev_pm_info.runtime_error is signed Geert Uytterhoeven
@ 2014-03-24 20:31 ` Geert Uytterhoeven
  2014-03-24 20:31 ` [PATCH 3/5] PM / Runtime: Correct documented return values for generic PM callbacks Geert Uytterhoeven
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-03-24 20:31 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Pavel Machek
  Cc: Ben Dooks, linux-pm, linux-kernel, Geert Uytterhoeven

From: Geert Uytterhoeven <geert+renesas@glider.be>

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 Documentation/power/runtime_pm.txt |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index a5683a5662cb..f62deb66d5c1 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -401,11 +401,11 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
   int pm_runtime_disable(struct device *dev);
     - increment the device's 'power.disable_depth' field (if the value of that
       field was previously zero, this prevents subsystem-level runtime PM
-      callbacks from being run for the device), make sure that all of the pending
-      runtime PM operations on the device are either completed or canceled;
-      returns 1 if there was a resume request pending and it was necessary to
-      execute the subsystem-level resume callback for the device to satisfy that
-      request, otherwise 0 is returned
+      callbacks from being run for the device), make sure that all of the
+      pending runtime PM operations on the device are either completed or
+      canceled; returns 1 if there was a resume request pending and it was
+      necessary to execute the subsystem-level resume callback for the device
+      to satisfy that request, otherwise 0 is returned
 
   int pm_runtime_barrier(struct device *dev);
     - check if there's a resume request pending for the device and resume it
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/5] PM / Runtime: Correct documented return values for generic PM callbacks
  2014-03-24 20:31 [PATCH 1/5] PM / Runtime: dev_pm_info.runtime_error is signed Geert Uytterhoeven
  2014-03-24 20:31 ` [PATCH 2/5] PM / Runtime: Split line longer than 80 characters Geert Uytterhoeven
@ 2014-03-24 20:31 ` Geert Uytterhoeven
  2014-03-24 20:31 ` [PATCH 4/5] PM / Runtime: GENERIC_SUBSYS_PM_OPS is gone Geert Uytterhoeven
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-03-24 20:31 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Pavel Machek
  Cc: Ben Dooks, linux-pm, linux-kernel, Geert Uytterhoeven

From: Geert Uytterhoeven <geert+renesas@glider.be>

As of commit 05aa55dddb9ee4045c320661068bea78dad6a6e5 ("PM / Runtime:
Lenient generic runtime pm callbacks"), the generic power management
callbacks pm_generic_runtime_suspend() and pm_generic_runtime_resume()
return 0, not -EINVAL, if the device doesn't provide its own callbacks.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 Documentation/power/runtime_pm.txt |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index f62deb66d5c1..8cc48b05939d 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -667,11 +667,11 @@ driver/base/power/generic_ops.c:
 
   int pm_generic_runtime_suspend(struct device *dev);
     - invoke the ->runtime_suspend() callback provided by the driver of this
-      device and return its result, or return -EINVAL if not defined
+      device and return its result, or return 0 if not defined
 
   int pm_generic_runtime_resume(struct device *dev);
     - invoke the ->runtime_resume() callback provided by the driver of this
-      device and return its result, or return -EINVAL if not defined
+      device and return its result, or return 0 if not defined
 
   int pm_generic_suspend(struct device *dev);
     - if the device has not been suspended at run time, invoke the ->suspend()
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/5] PM / Runtime: GENERIC_SUBSYS_PM_OPS is gone
  2014-03-24 20:31 [PATCH 1/5] PM / Runtime: dev_pm_info.runtime_error is signed Geert Uytterhoeven
  2014-03-24 20:31 ` [PATCH 2/5] PM / Runtime: Split line longer than 80 characters Geert Uytterhoeven
  2014-03-24 20:31 ` [PATCH 3/5] PM / Runtime: Correct documented return values for generic PM callbacks Geert Uytterhoeven
@ 2014-03-24 20:31 ` Geert Uytterhoeven
  2014-03-24 20:31 ` [PATCH 5/5] PM / Runtime: s/foo_process_requests/foo_process_next_request/ Geert Uytterhoeven
  2014-03-26 16:55 ` [PATCH 1/5] PM / Runtime: dev_pm_info.runtime_error is signed Pavel Machek
  4 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-03-24 20:31 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Pavel Machek
  Cc: Ben Dooks, linux-pm, linux-kernel, Geert Uytterhoeven

From: Geert Uytterhoeven <geert+renesas@glider.be>

Update the documentation for the removal of GENERIC_SUBSYS_PM_OPS in commit
90363ddf0a1a4dccfbb8d0c10b8f488bc7fa69f8 ("PM: Drop generic_subsys_pm_ops")

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 Documentation/power/runtime_pm.txt |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 8cc48b05939d..0c1c4124d23a 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -727,15 +727,12 @@ driver/base/power/generic_ops.c:
   int pm_generic_restore_noirq(struct device *dev);
     - invoke the ->restore_noirq() callback provided by the device's driver
 
-These functions can be assigned to the ->runtime_idle(), ->runtime_suspend(),
+These functions are the defaults used by the PM core, if a subsystem doesn't
+provide its own callbacks for ->runtime_idle(), ->runtime_suspend(),
 ->runtime_resume(), ->suspend(), ->suspend_noirq(), ->resume(),
 ->resume_noirq(), ->freeze(), ->freeze_noirq(), ->thaw(), ->thaw_noirq(),
-->poweroff(), ->poweroff_noirq(), ->restore(), ->restore_noirq() callback
-pointers in the subsystem-level dev_pm_ops structures.
-
-If a subsystem wishes to use all of them at the same time, it can simply assign
-the GENERIC_SUBSYS_PM_OPS macro, defined in include/linux/pm.h, to its
-dev_pm_ops structure pointer.
+->poweroff(), ->poweroff_noirq(), ->restore(), ->restore_noirq() in the
+subsystem-level dev_pm_ops structure.
 
 Device drivers that wish to use the same function as a system suspend, freeze,
 poweroff and runtime suspend callback, and similarly for system resume, thaw,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 5/5] PM / Runtime: s/foo_process_requests/foo_process_next_request/
  2014-03-24 20:31 [PATCH 1/5] PM / Runtime: dev_pm_info.runtime_error is signed Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2014-03-24 20:31 ` [PATCH 4/5] PM / Runtime: GENERIC_SUBSYS_PM_OPS is gone Geert Uytterhoeven
@ 2014-03-24 20:31 ` Geert Uytterhoeven
  2014-03-26 16:55 ` [PATCH 1/5] PM / Runtime: dev_pm_info.runtime_error is signed Pavel Machek
  4 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-03-24 20:31 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Pavel Machek
  Cc: Ben Dooks, linux-pm, linux-kernel, Geert Uytterhoeven

From: Geert Uytterhoeven <geert+renesas@glider.be>

The example uses foo_process_next_request() everywhere else.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 Documentation/power/runtime_pm.txt |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 0c1c4124d23a..5f96daf8566a 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -870,7 +870,7 @@ Here is a schematic pseudo-code example:
 		foo->is_suspended = 0;
 		pm_runtime_mark_last_busy(&foo->dev);
 		if (foo->num_pending_requests > 0)
-			foo_process_requests(foo);
+			foo_process_next_request(foo);
 		unlock(&foo->private_lock);
 		return 0;
 	}
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/5] PM / Runtime: dev_pm_info.runtime_error is signed
  2014-03-24 20:31 [PATCH 1/5] PM / Runtime: dev_pm_info.runtime_error is signed Geert Uytterhoeven
                   ` (3 preceding siblings ...)
  2014-03-24 20:31 ` [PATCH 5/5] PM / Runtime: s/foo_process_requests/foo_process_next_request/ Geert Uytterhoeven
@ 2014-03-26 16:55 ` Pavel Machek
  4 siblings, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2014-03-26 16:55 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rafael J. Wysocki, Len Brown, Ben Dooks, linux-pm, linux-kernel,
	Geert Uytterhoeven

On Mon 2014-03-24 21:31:27, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> dev_pm_info.runtime_error has always been a signed int, to store a signed
> error code. Correct the documentation.

Series looks ok to me.

Acked-by: Pavel Machek <pavel@ucw.cz>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-03-26 16:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-24 20:31 [PATCH 1/5] PM / Runtime: dev_pm_info.runtime_error is signed Geert Uytterhoeven
2014-03-24 20:31 ` [PATCH 2/5] PM / Runtime: Split line longer than 80 characters Geert Uytterhoeven
2014-03-24 20:31 ` [PATCH 3/5] PM / Runtime: Correct documented return values for generic PM callbacks Geert Uytterhoeven
2014-03-24 20:31 ` [PATCH 4/5] PM / Runtime: GENERIC_SUBSYS_PM_OPS is gone Geert Uytterhoeven
2014-03-24 20:31 ` [PATCH 5/5] PM / Runtime: s/foo_process_requests/foo_process_next_request/ Geert Uytterhoeven
2014-03-26 16:55 ` [PATCH 1/5] PM / Runtime: dev_pm_info.runtime_error is signed Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).