Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1619846 > unrolled thread

[PATCH 1/2] PM / Runtime: fix autosuspend documentation

Started byJohan Hovold <johan@kernel.org>
First post2017-04-10 13:40 +0200
Last post2017-04-10 18:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] PM / Runtime: fix autosuspend documentation Johan Hovold <johan@kernel.org> - 2017-04-10 13:40 +0200
    Re: [PATCH 1/2] PM / Runtime: fix autosuspend documentation Tony Lindgren <tony@atomide.com> - 2017-04-10 18:40 +0200

#1619846 — [PATCH 1/2] PM / Runtime: fix autosuspend documentation

FromJohan Hovold <johan@kernel.org>
Date2017-04-10 13:40 +0200
Subject[PATCH 1/2] PM / Runtime: fix autosuspend documentation
Message-ID<tuFPP-8ur-3@gated-at.bofh.it>
Update the autosuspend documentation which claimed that the autosuspend
delay is not taken into account when using the non-autosuspend helper
functions, something which is no longer true since commit d66e6db28df3
("PM / Runtime: Respect autosuspend when idle triggers suspend").

This specifically means that drivers must now disable autosuspend before
disabling runtime pm in probe error paths and remove callbacks if
pm_runtime_put_sync was being used to suspend the device before
returning. (If an idle callback can prevent suspend,
pm_runtime_put_sync_suspend must be used instead of pm_runtime_put_sync
as before.)

Also remove the claim that the autosuspend helpers behave "just like
the non-autosuspend counterparts", something which have never really
been true as some of the latter use idle notifications.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 Documentation/power/runtime_pm.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 64546eb9a16a..56a13b865927 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -836,9 +836,8 @@ of the non-autosuspend counterparts:
 	Instead of: pm_runtime_put_sync   use: pm_runtime_put_sync_autosuspend.
 
 Drivers may also continue to use the non-autosuspend helper functions; they
-will behave normally, not taking the autosuspend delay into account.
-Similarly, if the power.use_autosuspend field isn't set then the autosuspend
-helper functions will behave just like the non-autosuspend counterparts.
+will behave normally, which means sometimes taking the autosuspend delay into
+account (see pm_runtime_idle).
 
 Under some circumstances a driver or subsystem may want to prevent a device
 from autosuspending immediately, even though the usage counter is zero and the
-- 
2.12.2

[toc] | [next] | [standalone]


#1620228

FromTony Lindgren <tony@atomide.com>
Date2017-04-10 18:40 +0200
Message-ID<tuKwa-38R-1@gated-at.bofh.it>
In reply to#1619846
* Johan Hovold <johan@kernel.org> [170410 04:41]:
> Update the autosuspend documentation which claimed that the autosuspend
> delay is not taken into account when using the non-autosuspend helper
> functions, something which is no longer true since commit d66e6db28df3
> ("PM / Runtime: Respect autosuspend when idle triggers suspend").
> 
> This specifically means that drivers must now disable autosuspend before
> disabling runtime pm in probe error paths and remove callbacks if
> pm_runtime_put_sync was being used to suspend the device before
> returning. (If an idle callback can prevent suspend,
> pm_runtime_put_sync_suspend must be used instead of pm_runtime_put_sync
> as before.)
> 
> Also remove the claim that the autosuspend helpers behave "just like
> the non-autosuspend counterparts", something which have never really
> been true as some of the latter use idle notifications.
> 
> Signed-off-by: Johan Hovold <johan@kernel.org>

Acked-by: Tony Lindgren <tony@atomide.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web