From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Kevin Hilman <khilman@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH] PM / Domains: Power on the PM domain right after attach completes
Date: Tue, 18 Nov 2014 12:04:38 -0800 [thread overview]
Message-ID: <20141118200438.GG3003@dtor-ws> (raw)
In-Reply-To: <4282972.midaRTeXMU@vostro.rjw.lan>
On Tue, Nov 18, 2014 at 09:14:56PM +0100, Rafael J. Wysocki wrote:
> On Tuesday, November 18, 2014 09:55:15 AM Dmitry Torokhov wrote:
> > On Tue, Nov 18, 2014 at 12:44:22PM -0500, Alan Stern wrote:
> > > On Tue, 18 Nov 2014, Dmitry Torokhov wrote:
> > >
> > > > OK. Another question then: pm_runtime_get_noresume() does literally this:
> > > >
> > > > atomic_inc(&dev->power.usage_count);
> > > >
> > > > So who is responsible for actually waking up parent device and/or power
> > > > domain? Is it simply missing because we did not really have PM domains
> > > > before?
> > >
> > > Ths bus is responsible for making sure that all the standard resources
> > > are available -- that is, all the resources that would be needed by a
> > > normal device on that bus. Anything beyond that (such as
> > > special-purpose clocks) has to be set up by the driver.
> > >
> > > Thus the bus would insure that the device was powered, its parent was
> > > resumed, and the usual clock inputs were enabled. And of course, one
> > > mechanism for doing this is to runtime-resume the power domain.
> >
> > This does not sound like anything bus-specific. Can we move powering on
> > the domain before probing into the driver core, similarly to the default
> > pin selection by pinctrl?
>
> We could do that for genpd if devices were added to domains before registering
> (those devices). Otherwise, there's no guarantee that all has been set up yet.
>
> Note that this would only be the case for genpd, not for the ACPI PM domain
> in particular, for example. The reason why is that the ACPI PM domain cannot
> be used along with bus types that provide non-trivial PM callbacks, so pretty
> much the bus type's ->probe needs to decide whether or not to use it.
In genpd code there is a notion of providers that match devices and
domains. Can we do the same for ACPI and stuff all that knowledge into
it's "provider"?
IOW why ACPI is that special?
--
Dmitry
WARNING: multiple messages have this Message-ID (diff)
From: dmitry.torokhov@gmail.com (Dmitry Torokhov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PM / Domains: Power on the PM domain right after attach completes
Date: Tue, 18 Nov 2014 12:04:38 -0800 [thread overview]
Message-ID: <20141118200438.GG3003@dtor-ws> (raw)
In-Reply-To: <4282972.midaRTeXMU@vostro.rjw.lan>
On Tue, Nov 18, 2014 at 09:14:56PM +0100, Rafael J. Wysocki wrote:
> On Tuesday, November 18, 2014 09:55:15 AM Dmitry Torokhov wrote:
> > On Tue, Nov 18, 2014 at 12:44:22PM -0500, Alan Stern wrote:
> > > On Tue, 18 Nov 2014, Dmitry Torokhov wrote:
> > >
> > > > OK. Another question then: pm_runtime_get_noresume() does literally this:
> > > >
> > > > atomic_inc(&dev->power.usage_count);
> > > >
> > > > So who is responsible for actually waking up parent device and/or power
> > > > domain? Is it simply missing because we did not really have PM domains
> > > > before?
> > >
> > > Ths bus is responsible for making sure that all the standard resources
> > > are available -- that is, all the resources that would be needed by a
> > > normal device on that bus. Anything beyond that (such as
> > > special-purpose clocks) has to be set up by the driver.
> > >
> > > Thus the bus would insure that the device was powered, its parent was
> > > resumed, and the usual clock inputs were enabled. And of course, one
> > > mechanism for doing this is to runtime-resume the power domain.
> >
> > This does not sound like anything bus-specific. Can we move powering on
> > the domain before probing into the driver core, similarly to the default
> > pin selection by pinctrl?
>
> We could do that for genpd if devices were added to domains before registering
> (those devices). Otherwise, there's no guarantee that all has been set up yet.
>
> Note that this would only be the case for genpd, not for the ACPI PM domain
> in particular, for example. The reason why is that the ACPI PM domain cannot
> be used along with bus types that provide non-trivial PM callbacks, so pretty
> much the bus type's ->probe needs to decide whether or not to use it.
In genpd code there is a notion of providers that match devices and
domains. Can we do the same for ACPI and stuff all that knowledge into
it's "provider"?
IOW why ACPI is that special?
--
Dmitry
next prev parent reply other threads:[~2014-11-18 20:04 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-17 15:19 [PATCH] PM / Domains: Power on the PM domain right after attach completes Ulf Hansson
2014-11-17 15:19 ` Ulf Hansson
2014-11-17 15:32 ` Russell King - ARM Linux
2014-11-17 15:32 ` Russell King - ARM Linux
2014-11-17 16:54 ` Grygorii Strashko
2014-11-17 16:54 ` Grygorii Strashko
2014-11-17 17:07 ` Russell King - ARM Linux
2014-11-17 17:07 ` Russell King - ARM Linux
2014-11-17 18:28 ` Kevin Hilman
2014-11-17 18:28 ` Kevin Hilman
2014-11-17 19:06 ` Alan Stern
2014-11-17 19:06 ` Alan Stern
2014-11-17 19:17 ` Dmitry Torokhov
2014-11-17 19:17 ` Dmitry Torokhov
2014-11-17 19:54 ` Alan Stern
2014-11-17 19:54 ` Alan Stern
2014-11-17 20:28 ` Dmitry Torokhov
2014-11-17 20:28 ` Dmitry Torokhov
2014-11-17 20:49 ` Alan Stern
2014-11-17 20:49 ` Alan Stern
2014-11-17 21:11 ` Dmitry Torokhov
2014-11-17 21:11 ` Dmitry Torokhov
2014-11-17 21:44 ` Alan Stern
2014-11-17 21:44 ` Alan Stern
2014-11-17 22:02 ` Dmitry Torokhov
2014-11-17 22:02 ` Dmitry Torokhov
2014-11-17 22:12 ` Alan Stern
2014-11-17 22:12 ` Alan Stern
2014-11-17 22:17 ` Dmitry Torokhov
2014-11-17 22:17 ` Dmitry Torokhov
2014-11-17 23:28 ` Rafael J. Wysocki
2014-11-17 23:28 ` Rafael J. Wysocki
2014-11-17 23:26 ` Dmitry Torokhov
2014-11-17 23:26 ` Dmitry Torokhov
2014-11-18 0:26 ` Rafael J. Wysocki
2014-11-18 0:26 ` Rafael J. Wysocki
2014-11-18 2:16 ` Rafael J. Wysocki
2014-11-18 2:16 ` Rafael J. Wysocki
2014-11-18 14:05 ` Ulf Hansson
2014-11-18 14:05 ` Ulf Hansson
2014-11-18 20:29 ` Rafael J. Wysocki
2014-11-18 20:29 ` Rafael J. Wysocki
2014-11-19 8:54 ` Ulf Hansson
2014-11-19 8:54 ` Ulf Hansson
2014-11-20 0:35 ` Rafael J. Wysocki
2014-11-20 0:35 ` Rafael J. Wysocki
2014-11-20 10:13 ` Ulf Hansson
2014-11-20 10:13 ` Ulf Hansson
2014-11-20 20:56 ` Rafael J. Wysocki
2014-11-20 20:56 ` Rafael J. Wysocki
2014-11-20 12:17 ` Grygorii Strashko
2014-11-20 12:17 ` Grygorii Strashko
2014-11-20 13:01 ` Ulf Hansson
2014-11-20 13:01 ` Ulf Hansson
2014-11-20 15:06 ` Grygorii Strashko
2014-11-20 15:06 ` Grygorii Strashko
2014-11-18 16:13 ` Alan Stern
2014-11-18 16:13 ` Alan Stern
2014-11-18 17:18 ` Dmitry Torokhov
2014-11-18 17:18 ` Dmitry Torokhov
2014-11-18 17:44 ` Alan Stern
2014-11-18 17:44 ` Alan Stern
2014-11-18 17:55 ` Dmitry Torokhov
2014-11-18 17:55 ` Dmitry Torokhov
2014-11-18 20:14 ` Rafael J. Wysocki
2014-11-18 20:14 ` Rafael J. Wysocki
2014-11-18 20:04 ` Dmitry Torokhov [this message]
2014-11-18 20:04 ` Dmitry Torokhov
2014-11-18 21:03 ` Rafael J. Wysocki
2014-11-18 21:03 ` Rafael J. Wysocki
2014-11-18 21:17 ` Rafael J. Wysocki
2014-11-18 21:17 ` Rafael J. Wysocki
2014-11-18 21:02 ` Dmitry Torokhov
2014-11-18 21:02 ` Dmitry Torokhov
2014-11-18 21:58 ` Rafael J. Wysocki
2014-11-18 21:58 ` Rafael J. Wysocki
2014-11-18 21:44 ` Dmitry Torokhov
2014-11-18 21:44 ` Dmitry Torokhov
2014-11-18 22:10 ` Rafael J. Wysocki
2014-11-18 22:10 ` 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=20141118200438.GG3003@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=geert+renesas@glider.be \
--cc=khilman@kernel.org \
--cc=len.brown@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=s.nawrocki@samsung.com \
--cc=stern@rowland.harvard.edu \
--cc=ulf.hansson@linaro.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.