linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: linux-rockchip@lists.infradead.org, linux-pm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	Heiko Stuebner <heiko@sntech.de>, Joerg Roedel <joro@8bytes.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Kevin Hilman <khilman@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Daniel Kurtz <djkurtz@chromium.org>,
	Beata Michalska <b.michalska@samsung.com>
Subject: Re: [RFC PATCH 1/2] pm: Add PM domain notifications
Date: Thu, 11 Dec 2014 14:54:47 +0100	[thread overview]
Message-ID: <5489A227.8010907@samsung.com> (raw)
In-Reply-To: <CAAFQd5DrzYRCF3tW7cg=rZ3wB1G2kQtWbCx+Pby9obNTewsFdg@mail.gmail.com>

On 11/12/14 12:04, Tomasz Figa wrote:
...
>> > On 11/12/14 09:26, Tomasz Figa wrote:
>>> > > From: Sylwester Nawrocki <s.nawrocki@samsung.com>
>>> > >
>>> > > This patch adds notifiers to the runtime PM/genpd subsystem. It is now
>>> > > possible to register a notifier, which will be called before and after
>>> > > the generic power domain subsystem calls the power domain's power_on
>>> > > and power_off callbacks.
>>> > >
>>> > > Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>>> > > [tfiga@chromium.org: rebased]
>>> > > Signed-off-by: Tomasz Figa <tfiga@chromium.org>
>> >
>> > Not sure if you've noticed it, I posted an updated version of this patch
>> > recently [1]. The notifiers list is moved to struct generic_pm_domain
>> > there and it also allows to register a notifier for selected power domain
>> > by name.
> [snip]
>> > [1] http://www.spinics.net/lists/linux-samsung-soc/msg38549.html
>
> Ah, haven't noticed, sorry. The API using devices looks the same, so I
> guess we can simply have patch 2/2 of this series applied on top of
> your patch.

Yes, that should work.

> By the way, look-up by name (presumably hardcoded somewhere?) sounds a
> bit strange to me. What was the reason for it to be added?

Yes, that might not be a very elegant approach. We initially used it
to implement power domain on/off sequence per specific domain and SoC,
since it appeared resistant to generalize.  I.e. the control register
write sequences are different per domain and per SoC (exynos).
So we named the domains in the device tree in that way:

	pm_domains: pm-domains@10024000 {
		compatible = "samsung,exynos4415-pd";
		reg-names = "cam", "tv", "mfc", "g3d",
		            "lcd0", "isp0", "isp1";
		reg = <0x10024000 0x20>, <0x10024020 0x20>,
		      <0x10024040 0x20>, <0x10024060 0x20>,
		      <0x10024080 0x20>, <0x100240A0 0x20>,
		      <0x100240E0 0x20>;
		#power-domain-cells = <1>;
	};

and then, for example, in the exynos CMU_ISP{0, 1} (clock controller)
driver registered for notification on "isp0" and "isp1" power domains
("isp1" is a sub-domain of "isp0" and the consumer devices are normally
attached to "isp1").

We have been investigating if we could do without the notification
at the clocks driver side, then the all SoC/power domain specific code
would end up in the exynos power domain driver. But I'm afraid it's
not going to work for all SoCs. Anyway lookup by name might be not
needed.


--
Regards,
Sylwester

  reply	other threads:[~2014-12-11 13:54 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-11  8:26 [RFC PATCH 0/2] Fix rockchip IOMMU driver vs PM issues Tomasz Figa
2014-12-11  8:26 ` [RFC PATCH 1/2] pm: Add PM domain notifications Tomasz Figa
2014-12-11 10:36   ` Sylwester Nawrocki
2014-12-11 11:04     ` Tomasz Figa
2014-12-11 13:54       ` Sylwester Nawrocki [this message]
     [not found]         ` <5489A227.8010907-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-12-11 15:30           ` Ulf Hansson
2014-12-11  8:26 ` [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM Tomasz Figa
2014-12-11 11:58   ` Ulf Hansson
2014-12-11 12:42     ` Tomasz Figa
     [not found]       ` <CAAFQd5CA374MF-_w=3zqsZctwTcBHz9J_0Ygg4fD_wjg8kLATg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-12-11 15:22         ` Ulf Hansson
2014-12-11 15:31       ` Kevin Hilman
     [not found]         ` <7h8uiemce7.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2014-12-11 15:51           ` Ulf Hansson
2014-12-11 20:48             ` Rafael J. Wysocki
2014-12-12  4:15               ` Tomasz Figa
2014-12-12 20:04                 ` Kevin Hilman
2014-12-15  2:32                   ` Tomasz Figa
     [not found]                   ` <7ha92sk533.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2014-12-15  8:35                     ` Geert Uytterhoeven
     [not found]                       ` <CAMuHMdVpCgK-hNqZ=JWjFGS53g+ZUQ5t=uBxtN1qGXJhoRg8BQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-12-15 18:06                         ` Kevin Hilman
     [not found]                 ` <CAAFQd5B28WiWUqmbmROJUa3H25R=Y774NuemTZDvkoa=CvZUsw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-12-12 20:47                   ` Laurent Pinchart
2014-12-15  2:39                     ` Tomasz Figa
     [not found]                       ` <CAAFQd5A5UAYpV6Z3ii+TTuPOxJF8VFJmnUnHZWkc9dZN04qxYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-12-15 19:53                         ` Laurent Pinchart
2014-12-16  2:18                           ` Tomasz Figa
2014-12-17  0:15                             ` Laurent Pinchart
2014-12-18  1:32                               ` Rafael J. Wysocki
2014-12-18 19:12                                 ` Laurent Pinchart
2014-12-18 21:14                                   ` Kevin Hilman
     [not found]                                     ` <7hppbg7j9r.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2014-12-18 21:28                                       ` Laurent Pinchart
2014-12-19  2:27                                         ` Rafael J. Wysocki
2014-12-20 19:01                                           ` Laurent Pinchart

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=5489A227.8010907@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=b.michalska@samsung.com \
    --cc=djkurtz@chromium.org \
    --cc=geert+renesas@glider.be \
    --cc=heiko@sntech.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=khilman@linaro.org \
    --cc=len.brown@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=tfiga@chromium.org \
    --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 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).