From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Kevin Hilman <khilman@linaro.org>,
Alan Stern <stern@rowland.harvard.edu>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Tomasz Figa <tomasz.figa@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Simon Horman <horms@verge.net.au>,
Magnus Damm <magnus.damm@gmail.com>,
Ben Dooks <ben-linux@fluff.org>,
Kukjin Kim <kgene.kim@samsung.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Philipp Zabel <philipp.zabel@gmail.com>,
Mark Brown <broonie@kernel.org>, Tomasz Figa <t.figa@samsung.com>
Subject: Re: [PATCH 02/24] drivercore: Bind/unbind power domain on probe/remove
Date: Tue, 10 Jun 2014 14:27:31 -0700 [thread overview]
Message-ID: <20140610212731.GA11191@kroah.com> (raw)
In-Reply-To: <1894835.cKK4602bPf@vostro.rjw.lan>
On Tue, Jun 10, 2014 at 11:27:45PM +0200, Rafael J. Wysocki wrote:
> On Tuesday, June 10, 2014 02:53:26 PM Ulf Hansson wrote:
> > On 10 June 2014 14:11, Rafael J. Wysocki <rafael@kernel.org> wrote:
> > > On Tue, Jun 10, 2014 at 12:51 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> > >> From: Tomasz Figa <t.figa@samsung.com>
> > >>
> > >> On a number of platforms, devices are part of controllable power
> > >> domains, which need to be enabled before such devices can be accessed
> > >> and may be powered down when the device is idle to save some power.
> > >> This means that on systems that support power domain control using
> > >> generic power domains subsystem, it is necessary to add device to its
> > >> power domain before binding a driver to it and remove it from its power
> > >> domain after its driver is unbound to make sure that an unused device
> > >> does not affect power domain state.
> > >>
> > >> Since this is not limited to particular busses and specific
> > >> archs/platforms,
> > >
> > > Actually, this isn't correrct. It is limited to the platforms that
> > > use Device Trees now.
> >
> > Correct, we should update the commit message/docs.
> >
> > >
> > > Moreover, it is not consistent with the way we add devices to the ACPI PM
> > > domain, which is the ACPI counterpart of this.
> >
> > I am not sure why you think consistency for ACPI is important here.
> > ACPI PM will still be able to handle it's domain/device registering as
> > before. There are even other pm_domains that don't use genpd which
> > need to handle this themselves.
>
> My point is that doing things like that in different places for different
> firmware interfaces is confusing and likely to lead to coding mistakes in
> the future.
>
> > Or are you saying that you prefer bus notifiers in favour of making
> > use of the driver core for this matter?
>
> Well, please grep for acpi_dev_pm_attach() and see where it is done.
> Surely not in drivers/base/dd.c. Also I'm not sure why you're talking
> about bus notifiers in this context.
>
> > Shouldn't the driver core handle most of the common things for a device
> > driver?
>
> Common, yes. Platform-specific, no.
>
> > Let's compare how the pinctrls are being managed in the driver core, for
> > example.
>
> pinctrl has Device Trees support only at the moment (as far as firmware
> interfaces go) and quite frankly I'm not sure if/how we'll need to change
> it to cover ACPI as well.
>
> But for power domains, please keep that stuff away from dd.c. That is,
> unless Greg specifically disagrees with me and decides to apply this
> patch regardless. :-)
Nope, no disagreement from me toward you at all here, keep up the good
work :)
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: gregkh@linuxfoundation.org (Greg Kroah-Hartman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/24] drivercore: Bind/unbind power domain on probe/remove
Date: Tue, 10 Jun 2014 14:27:31 -0700 [thread overview]
Message-ID: <20140610212731.GA11191@kroah.com> (raw)
In-Reply-To: <1894835.cKK4602bPf@vostro.rjw.lan>
On Tue, Jun 10, 2014 at 11:27:45PM +0200, Rafael J. Wysocki wrote:
> On Tuesday, June 10, 2014 02:53:26 PM Ulf Hansson wrote:
> > On 10 June 2014 14:11, Rafael J. Wysocki <rafael@kernel.org> wrote:
> > > On Tue, Jun 10, 2014 at 12:51 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> > >> From: Tomasz Figa <t.figa@samsung.com>
> > >>
> > >> On a number of platforms, devices are part of controllable power
> > >> domains, which need to be enabled before such devices can be accessed
> > >> and may be powered down when the device is idle to save some power.
> > >> This means that on systems that support power domain control using
> > >> generic power domains subsystem, it is necessary to add device to its
> > >> power domain before binding a driver to it and remove it from its power
> > >> domain after its driver is unbound to make sure that an unused device
> > >> does not affect power domain state.
> > >>
> > >> Since this is not limited to particular busses and specific
> > >> archs/platforms,
> > >
> > > Actually, this isn't correrct. It is limited to the platforms that
> > > use Device Trees now.
> >
> > Correct, we should update the commit message/docs.
> >
> > >
> > > Moreover, it is not consistent with the way we add devices to the ACPI PM
> > > domain, which is the ACPI counterpart of this.
> >
> > I am not sure why you think consistency for ACPI is important here.
> > ACPI PM will still be able to handle it's domain/device registering as
> > before. There are even other pm_domains that don't use genpd which
> > need to handle this themselves.
>
> My point is that doing things like that in different places for different
> firmware interfaces is confusing and likely to lead to coding mistakes in
> the future.
>
> > Or are you saying that you prefer bus notifiers in favour of making
> > use of the driver core for this matter?
>
> Well, please grep for acpi_dev_pm_attach() and see where it is done.
> Surely not in drivers/base/dd.c. Also I'm not sure why you're talking
> about bus notifiers in this context.
>
> > Shouldn't the driver core handle most of the common things for a device
> > driver?
>
> Common, yes. Platform-specific, no.
>
> > Let's compare how the pinctrls are being managed in the driver core, for
> > example.
>
> pinctrl has Device Trees support only at the moment (as far as firmware
> interfaces go) and quite frankly I'm not sure if/how we'll need to change
> it to cover ACPI as well.
>
> But for power domains, please keep that stuff away from dd.c. That is,
> unless Greg specifically disagrees with me and decides to apply this
> patch regardless. :-)
Nope, no disagreement from me toward you at all here, keep up the good
work :)
greg k-h
next prev parent reply other threads:[~2014-06-10 21:23 UTC|newest]
Thread overview: 92+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-10 10:51 [PATCH 00/24] PM / Domains: Generic OF-based support and cleanups Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 01/24] base: power: Add generic OF-based power domain look-up Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 02/24] drivercore: Bind/unbind power domain on probe/remove Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 12:11 ` Rafael J. Wysocki
2014-06-10 12:11 ` Rafael J. Wysocki
2014-06-10 12:53 ` Ulf Hansson
2014-06-10 12:53 ` Ulf Hansson
2014-06-10 21:27 ` Rafael J. Wysocki
2014-06-10 21:27 ` Rafael J. Wysocki
2014-06-10 21:27 ` Greg Kroah-Hartman [this message]
2014-06-10 21:27 ` Greg Kroah-Hartman
2014-06-10 21:42 ` Tomasz Figa
2014-06-10 21:42 ` Tomasz Figa
2014-06-10 22:15 ` Ulf Hansson
2014-06-10 22:15 ` Ulf Hansson
2014-06-11 0:18 ` Rafael J. Wysocki
2014-06-11 0:18 ` Rafael J. Wysocki
2014-06-12 16:39 ` Mark Brown
2014-06-12 16:39 ` Mark Brown
2014-06-12 19:33 ` Rafael Wysocki
2014-06-12 19:33 ` Rafael Wysocki
2014-06-11 18:16 ` Kevin Hilman
2014-06-11 18:16 ` Kevin Hilman
2014-06-11 18:19 ` Tomasz Figa
2014-06-11 18:19 ` Tomasz Figa
2014-06-10 10:51 ` [PATCH 03/24] ARM: exynos: Move to generic power domain bindings Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 04/24] PM / Domains: Ignore callbacks for subsys generic_pm_domain_data Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 05/24] PM / Domains: Remove the pm_genpd_add|remove_callbacks APIs Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 06/24] PM / Domains: Remove system PM callbacks from gpd_dev_ops Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 07/24] ARM: shmobile: Drop dev_irq_safe from r8a7779 genpd config Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-11 18:13 ` Kevin Hilman
2014-06-11 18:13 ` Kevin Hilman
2014-06-11 20:34 ` Ulf Hansson
2014-06-11 20:34 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 08/24] ARM: shmobile: Drop dev_irq_safe from R-mobile " Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 09/24] PM / Domains: Remove dev_irq_safe from " Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 10/24] PM / Domains: Remove redundant check for CONFIG_PM Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 11/24] PM / Domains: Remove legacy API for adding devices through DT Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 12/24] PM / Domains: Remove pm_genpd_syscore_switch() API Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 13/24] PM / Domains: Remove genpd_queue_power_off_work() API Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 14/24] PM / Domains: Add late_initcall to disable unused domains Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 15/24] ARM: exynos: Leave disabling of unused pm domains to genpd Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 16/24] ARM: s3c64xx: " Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 18/24] PM / Domains: Remove default_stop_ok() API Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 19/24] dt: bindings: ux500: Add documentation for power domains Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-11 18:20 ` Kevin Hilman
2014-06-11 18:20 ` Kevin Hilman
2014-06-12 10:26 ` Pavel Machek
2014-06-12 10:26 ` Pavel Machek
2014-06-10 10:51 ` [PATCH 20/24] dt: bindings: ux500: Add header for power domains specifiers Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-11 18:19 ` Kevin Hilman
2014-06-11 18:19 ` Kevin Hilman
[not found] ` <1402397497-26737-1-git-send-email-ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-06-10 10:51 ` [PATCH 17/24] drivers: sh: Leave disabling of unused pm domains to genpd Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 21/24] ARM: ux500: Initial support for power domains Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 22/24] ARM: ux500: Enable Kconfig for the generic power domain Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 23/24] ARM: ux500: Add DT node for ux500 power domains Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-10 10:51 ` [PATCH 24/24] ARM: ux500: Add sdi[n] devices to VAPE power domain Ulf Hansson
2014-06-10 10:51 ` Ulf Hansson
2014-06-11 18:23 ` [PATCH 00/24] PM / Domains: Generic OF-based support and cleanups Kevin Hilman
2014-06-11 18:23 ` Kevin Hilman
2014-06-11 18:32 ` Rafael J. Wysocki
2014-06-11 18:32 ` Rafael J. Wysocki
2014-06-11 20:21 ` Ulf Hansson
2014-06-11 20:21 ` Ulf Hansson
2014-08-22 12:15 ` Geert Uytterhoeven
2014-08-22 12:15 ` Geert Uytterhoeven
2014-08-22 15:56 ` Ulf Hansson
2014-08-22 15:56 ` Ulf Hansson
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=20140610212731.GA11191@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=ben-linux@fluff.org \
--cc=broonie@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=horms@verge.net.au \
--cc=kgene.kim@samsung.com \
--cc=khilman@linaro.org \
--cc=len.brown@intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=pavel@ucw.cz \
--cc=philipp.zabel@gmail.com \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=sboyd@codeaurora.org \
--cc=stern@rowland.harvard.edu \
--cc=t.figa@samsung.com \
--cc=tomasz.figa@gmail.com \
--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.