linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: amit daniel kachhap <amit.daniel@samsung.com>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Pankaj Dubey <pankaj.dubey@samsung.com>,
	Kevin Hilman <khilman@kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH RFC v2 07/12] PM / Domains: export pm_genpd_lookup_name
Date: Thu, 27 Nov 2014 15:20:42 +0100	[thread overview]
Message-ID: <CAPDyKFo0epKqKuwHS_CKMG2hF+J=Fdve9kPK2EVeeR7FvdoJmg@mail.gmail.com> (raw)
In-Reply-To: <CADGdYn6fAScrpz4Va=THtC1ZgT+rYN_gQuE6NnRaCiN4NErg5g@mail.gmail.com>

On 25 November 2014 at 09:48, amit daniel kachhap
<amit.daniel@samsung.com> wrote:
> On Tue, Nov 25, 2014 at 1:05 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>> On 24 November 2014 at 14:04, Amit Daniel Kachhap
>> <amit.daniel@samsung.com> wrote:
>>> This API may be needed to set the power domain parent/child relationship
>>> in the power domain platform driver. The parent relationship is
>>> generally set after the child power domain is registered with the power
>>> domain subsystem. In this case, pm_genpd_lookup_name API might be
>>> useful.
>>
>> I think this is a step in the wrong direction. Instead we should be
>> working on removing the "name" based APIs from genpd.
>>
>> The proper way should be to pass the PM domain as a parameter to the
>> APIs instead.
> Yes i understand but i had a special requirement for using this API
> during pd probe.
>  I cannot use hierarchy to represent parent/child pd nodes as it will
> break the existing SoC's. In my case all the PD nodes are linear. The
> parent/child relationship are established in the second pass after all
> the PD entries are registered with the help of this API.
> Although there a way that i can always keep parent PD's before the
> child PD's in DT in linear order. Will check this approach.

I had some thinking around this, could the below approach work?

I just posted a patch[1] adding a new pm_genpd_lookup() API, which is
using a "DT device node" to fetch the genpd. The idea is to use that
API to get the genpd handle which is needed to configure a subdomain
through pm_genpd_add_subdomain() API.

In principle you will have to walk through the DT a couple of times,
initialize those domains (and subdomains) which either don't have a
parent domain or which parent domain already has been initialized. I
guess you need a somewhat clever loop to do that, but I think it's
doable.

Obviously we also need to have a generic binding for a "parent
domain". I like Geert's proposal from the other patch, which means
using "power-domains = <&pd_xyz>".

Kind regards
Uffe

[1]
http://marc.info/?l=linux-pm&m=141709766008458&w=2

  reply	other threads:[~2014-11-27 14:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24 12:52 [PATCH RFC v2 00/12] soc: samsung: Modify and enhance power domain driver Amit Daniel Kachhap
2014-11-24 13:04 ` [PATCH RFC v2 01/12] arm: exynos: Add platform driver support for " Amit Daniel Kachhap
2014-11-24 13:04   ` [PATCH RFC v2 02/12] soc: exynos: Move exynos power domain file to driver/soc/samsung folder Amit Daniel Kachhap
2014-11-24 13:04   ` [PATCH RFC v2 03/12] soc: samsung: exynos-pmu: Register exynos pd driver as a mfd client Amit Daniel Kachhap
2014-11-24 13:04   ` [PATCH RFC v2 04/12] soc: samsung: Re-structure PMU driver to create pd on/off handlers Amit Daniel Kachhap
2014-11-24 13:04   ` [PATCH RFC v2 05/12] soc: samsung: pm_domain: Use unique compatible name for power domain Amit Daniel Kachhap
2014-11-24 13:04   ` [PATCH RFC v2 06/12] driver: soc: exynos-pmu: Add exynos7 power domain on/off ops Amit Daniel Kachhap
     [not found]     ` <1416834256-11225-6-git-send-email-amit.daniel-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-11-25  7:30       ` Ulf Hansson
2014-11-25  8:33         ` amit daniel kachhap
2014-11-24 13:04   ` [PATCH RFC v2 07/12] PM / Domains: export pm_genpd_lookup_name Amit Daniel Kachhap
2014-11-25  7:35     ` Ulf Hansson
2014-11-25  8:48       ` amit daniel kachhap
2014-11-27 14:20         ` Ulf Hansson [this message]
2014-11-28  8:52           ` amit daniel kachhap
2014-11-24 13:04   ` [PATCH RFC v2 08/12] soc: samsung: pm_domain: Add support for parent power domain Amit Daniel Kachhap
2014-11-25  7:59     ` Ulf Hansson
     [not found]       ` <CAPDyKFoBnViXQF=wDYp0x4gaOO4ht3a8KBeY6=k6_Zkkav28pQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-25  8:57         ` amit daniel kachhap
2014-11-25  9:19           ` Geert Uytterhoeven
2014-12-03  8:36             ` Marek Szyprowski
2014-11-24 13:04   ` [PATCH RFC v2 09/12] drivers: soc: pm_domain: Modify the parent clocks bindings Amit Daniel Kachhap
2014-11-24 13:04   ` [PATCH RFC v2 10/12] drivers: soc: samsung: Add support for clock enabling in power domain Amit Daniel Kachhap
     [not found]   ` <1416834256-11225-1-git-send-email-amit.daniel-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-11-24 13:04     ` [PATCH RFC v2 11/12] drivers: soc: samsung: Add support for clock rate save/restore " Amit Daniel Kachhap
2014-11-24 13:04   ` [PATCH RFC v2 12/12] arm64: Kconfig: Enable PM_GENERIC_DOMAINS for exynos7 Amit Daniel Kachhap

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='CAPDyKFo0epKqKuwHS_CKMG2hF+J=Fdve9kPK2EVeeR7FvdoJmg@mail.gmail.com' \
    --to=ulf.hansson@linaro.org \
    --cc=amit.daniel@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=kgene.kim@samsung.com \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=pankaj.dubey@samsung.com \
    --cc=rjw@rjwysocki.net \
    --cc=s.nawrocki@samsung.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).