From: Ulf Hansson <ulf.hansson@linaro.org>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Kevin Hilman <khilman@linaro.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Linus Walleij <linus.walleij@linaro.org>,
Archit Taneja <archit@ti.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: Async runtime put in __device_release_driver()
Date: Tue, 5 Nov 2013 22:29:49 +0100 [thread overview]
Message-ID: <CAPDyKFp0UGjEbn+pWDLKOQvKsxeXSh5hY3++TA1rpErfihOtPA@mail.gmail.com> (raw)
In-Reply-To: <5267A0DF.7080604@ti.com>
On 23 October 2013 12:11, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> Hi,
>
> I was debugging why clocks were left enabled after removing omapdss
> driver, and I found this commit:
>
> fa180eb448fa263cf18dd930143b515d27d70d7b (PM / Runtime: Idle devices
> asynchronously after probe|release)
>
> I don't understand how that is supposed to work.
>
> When a driver is removed, instead of using pm_runtime_put_sync() the
> commit uses pm_runtime_put(), so the runtime_suspend call is queued. But
> who is going to handle the queued suspend call, as the driver is already
> removed? At least in my case, obviously nobody, as I only get
> runtime_resume call in my driver, never the runtime_suspend.
>
> Is there something I need to add to my driver to make this work, or
> should that part of the patch be reverted?
I believe it is quite common that a device driver calls
pm_runtime_get_sync as a part of it's remove callback, then it
explicitly returns it's resources that has been fetched during probe.
Like a clk_disable_unprepare for example.
The idea behind the change in __device_release_driver, was to try to
prevent devices from going active->idle->active and instead just
remain active (if possible).
In your case, which seems like a more modern way of implementing
"remove", you shall call "pm_runtime_suspend" to make sure the
runtime_suspend callbacks gets called.
Kind regards
Ulf Hansson
>
> Tomi
>
next prev parent reply other threads:[~2013-11-05 21:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-23 10:11 Async runtime put in __device_release_driver() Tomi Valkeinen
2013-11-05 21:29 ` Ulf Hansson [this message]
2013-11-06 7:51 ` Tomi Valkeinen
2013-11-06 22:01 ` Rafael J. Wysocki
2013-11-06 22:02 ` Alan Stern
2013-11-06 22:19 ` Rafael J. Wysocki
2013-11-06 22:48 ` Ulf Hansson
2013-11-07 0:16 ` Rafael J. Wysocki
2013-11-07 0:21 ` Kevin Hilman
2013-11-07 1:05 ` Rafael J. Wysocki
2013-11-07 8:18 ` Ulf Hansson
2013-11-07 18:55 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPDyKFp0UGjEbn+pWDLKOQvKsxeXSh5hY3++TA1rpErfihOtPA@mail.gmail.com \
--to=ulf.hansson@linaro.org \
--cc=archit@ti.com \
--cc=khilman@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).