Skip to content

PM: runtime: Close some gaps related to autosuspend

Rafael J. Wysocki driver-core linux-pm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4PM: runtime: Update last_busy in all rpm_idle() pathsdrivers/base/power/runtime.c+15 -14 replies
2/4PM: runtime: Drop space characters preceding labelsdrivers/base/power/runtime.c+16 -164 replies
3/4PM: runtime: Let devices suspend after an attempted resumedrivers/base/power/runtime.c+8 -41 reply
4/4PM: runtime: Drop direct last_busy updates from rpm_resume()drivers/base/power/runtime.c+0 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/4] PM: runtime: Close some gaps related to autosuspend

Hi All,

This is a follow-up series for

https://web.git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=26236a3e8803f7e1ace104020d7f006edb220116

which is in linux-next.

First of all, I was mistaken when I wrote this in the changelog of the above:

Updating the last_busy timestamp when rpm_idle() returns an error without calling rpm_suspend() is not useful because the device is then going to remain active for an unknown amount of time and its autosuspend delay needs to take effect later.

There actually is a reason for doing this which is that an autosuspend timer (left behind by an intermediate runtime resume) may be running when rpm_idle() runs and that autosuspend timer needs to be prevented from using a soon-to-be-stale last_busy timestamp value. There is one more issue related to that in __pm_runtime_idle() and both are addressed by patch [1/4].

Patch [2/4] simply removes spaces preceding labels as a matter of cleanup.

Patch [3/4] removes one more difference in the handling of devices that are resumed by rpm_resume() and those that are already active when they are passed to that function.

Patch [4/4] drops the direct pm_runtime_mark_last_busy() calls from rpm_resume() that are not needed any more after the previous changes.

For details, please see the patch changelogs.

Thanks!