diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2016-04-02 23:23:07 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-04-04 21:46:59 -0400 |
commit | 8fd2910e31155d8562180cc8580bc27e3be4f4bf (patch) | |
tree | f7315ae6cc2f4d888eb4dc1e20deb44d74b1b207 /Documentation/power | |
parent | 9735a22799b9214d17d3c231fe377fc852f042e9 (diff) |
PM / runtime: Document steps for device removal
Put a reminder that during device removal drivers should revert all PM
runtime changes from the probe.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Documentation/power')
-rw-r--r-- | Documentation/power/runtime_pm.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 7328cf85236c..1fd1fbe9ce95 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
@@ -586,6 +586,10 @@ drivers to make their ->remove() callbacks avoid races with runtime PM directly, | |||
586 | but also it allows of more flexibility in the handling of devices during the | 586 | but also it allows of more flexibility in the handling of devices during the |
587 | removal of their drivers. | 587 | removal of their drivers. |
588 | 588 | ||
589 | Drivers in ->remove() callback should undo the runtime PM changes done | ||
590 | in ->probe(). Usually this means calling pm_runtime_disable(), | ||
591 | pm_runtime_dont_use_autosuspend() etc. | ||
592 | |||
589 | The user space can effectively disallow the driver of the device to power manage | 593 | The user space can effectively disallow the driver of the device to power manage |
590 | it at run time by changing the value of its /sys/devices/.../power/control | 594 | it at run time by changing the value of its /sys/devices/.../power/control |
591 | attribute to "on", which causes pm_runtime_forbid() to be called. In principle, | 595 | attribute to "on", which causes pm_runtime_forbid() to be called. In principle, |