Skip to content

Commit

Permalink
PM / runtime: Fix autosuspend documentation
Browse files Browse the repository at this point in the history
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 d66e6db
("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>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Johan Hovold authored and Rafael J. Wysocki committed Apr 19, 2017
1 parent 4f7d029 commit 72ec2e1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Documentation/power/runtime_pm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72ec2e1

Please sign in to comment.