提交 8fd2910e 编写于 作者: K Krzysztof Kozlowski 提交者: Rafael J. Wysocki

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: NKrzysztof Kozlowski <krzk@kernel.org>
Acked-by: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 9735a227
...@@ -586,6 +586,10 @@ drivers to make their ->remove() callbacks avoid races with runtime PM directly, ...@@ -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 but also it allows of more flexibility in the handling of devices during the
removal of their drivers. 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 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 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, attribute to "on", which causes pm_runtime_forbid() to be called. In principle,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册