Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1370087 > unrolled thread
| Started by | Krzysztof Kozlowski <krzk@kernel.org> |
|---|---|
| First post | 2016-04-03 05:30 +0200 |
| Last post | 2016-04-07 01:40 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v2] PM / runtime: Document steps for device removal Krzysztof Kozlowski <krzk@kernel.org> - 2016-04-03 05:30 +0200
Re: [PATCH v2] PM / runtime: Document steps for device removal Alan Stern <stern@rowland.harvard.edu> - 2016-04-03 20:30 +0200
Re: [PATCH v2] PM / runtime: Document steps for device removal "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-04-07 01:40 +0200
| From | Krzysztof Kozlowski <krzk@kernel.org> |
|---|---|
| Date | 2016-04-03 05:30 +0200 |
| Subject | [PATCH v2] PM / runtime: Document steps for device removal |
| Message-ID | <rjGTD-5yO-1@gated-at.bofh.it> |
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> --- Changes since v1: 1. Address Alan's comments. --- Documentation/power/runtime_pm.txt | 4 ++++ 1 file changed, 4 insertions(+) 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, 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, -- 2.1.4
[toc] | [next] | [standalone]
| From | Alan Stern <stern@rowland.harvard.edu> |
|---|---|
| Date | 2016-04-03 20:30 +0200 |
| Message-ID | <rjUWC-7zj-5@gated-at.bofh.it> |
| In reply to | #1370087 |
On Sun, 3 Apr 2016, Krzysztof Kozlowski wrote: > 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> > > --- > > Changes since v1: > 1. Address Alan's comments. > --- > Documentation/power/runtime_pm.txt | 4 ++++ > 1 file changed, 4 insertions(+) > > 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, > 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, Acked-by: Alan Stern <stern@rowland.harvard.edu>
[toc] | [prev] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2016-04-07 01:40 +0200 |
| Message-ID | <rl5dg-39g-17@gated-at.bofh.it> |
| In reply to | #1370270 |
On Sunday, April 03, 2016 02:27:27 PM Alan Stern wrote: > On Sun, 3 Apr 2016, Krzysztof Kozlowski wrote: > > > 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> > > > > --- > > > > Changes since v1: > > 1. Address Alan's comments. > > --- > > Documentation/power/runtime_pm.txt | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > 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, > > 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, > > Acked-by: Alan Stern <stern@rowland.harvard.edu> Applied, thanks!
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web