Skip to content

Commit

Permalink
PM / runtime: Document steps for device removal
Browse files Browse the repository at this point in the history
Put a reminder that during device removal drivers should revert all PM
runtime changes from the probe.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
krzk authored and rafaeljw committed Apr 5, 2016
1 parent 9735a22 commit 8fd2910
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Documentation/power/runtime_pm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,10 @@ drivers to make their ->remove() callbacks avoid races with runtime PM directly,
but also it allows of more flexibility in the handling of devices during the
removal of their drivers.

Drivers in ->remove() callback should undo the runtime PM changes done
in ->probe(). Usually this means calling pm_runtime_disable(),
pm_runtime_dont_use_autosuspend() etc.

The user space can effectively disallow the driver of the device to power manage
it at run time by changing the value of its /sys/devices/.../power/control
attribute to "on", which causes pm_runtime_forbid() to be called. In principle,
Expand Down

0 comments on commit 8fd2910

Please sign in to comment.