All of lore.kernel.org
 help / color / mirror / Atom feed
From: amit daniel kachhap <amit.daniel@samsung.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
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: Tue, 25 Nov 2014 14:18:33 +0530	[thread overview]
Message-ID: <CADGdYn6fAScrpz4Va=THtC1ZgT+rYN_gQuE6NnRaCiN4NErg5g@mail.gmail.com> (raw)
In-Reply-To: <CAPDyKFqE_qhrRs3X9s9juyPH_Zcq8vdE_amqKM3VUnMjHtL2Rg@mail.gmail.com>

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.

Regards,
Amit
>
> Kind regards
> Uffe
>
>>
>> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
>> ---
>>  drivers/base/power/domain.c |    3 ++-
>>  include/linux/pm_domain.h   |    7 +++++++
>>  2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
>> index fb83d4a..b0e1c2f 100644
>> --- a/drivers/base/power/domain.c
>> +++ b/drivers/base/power/domain.c
>> @@ -49,7 +49,7 @@
>>  static LIST_HEAD(gpd_list);
>>  static DEFINE_MUTEX(gpd_list_lock);
>>
>> -static struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
>> +struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
>>  {
>>         struct generic_pm_domain *genpd = NULL, *gpd;
>>
>> @@ -66,6 +66,7 @@ static struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
>>         mutex_unlock(&gpd_list_lock);
>>         return genpd;
>>  }
>> +EXPORT_SYMBOL_GPL(pm_genpd_lookup_name);
>>
>>  struct generic_pm_domain *dev_to_genpd(struct device *dev)
>>  {
>> diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
>> index 2e0e06d..aedcec3 100644
>> --- a/include/linux/pm_domain.h
>> +++ b/include/linux/pm_domain.h
>> @@ -150,6 +150,8 @@ extern int pm_genpd_name_poweron(const char *domain_name);
>>
>>  extern struct dev_power_governor simple_qos_governor;
>>  extern struct dev_power_governor pm_domain_always_on_gov;
>> +
>> +extern struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name);
>>  #else
>>
>>  static inline struct generic_pm_domain_data *dev_gpd_data(struct device *dev)
>> @@ -221,6 +223,11 @@ static inline int pm_genpd_name_poweron(const char *domain_name)
>>  {
>>         return -ENOSYS;
>>  }
>> +static inline
>> +struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
>> +{
>> +       return NULL;
>> +}
>>  #define simple_qos_governor NULL
>>  #define pm_domain_always_on_gov NULL
>>  #endif
>> --
>> 1.7.9.5
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

WARNING: multiple messages have this Message-ID (diff)
From: amit.daniel@samsung.com (amit daniel kachhap)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC v2 07/12] PM / Domains: export pm_genpd_lookup_name
Date: Tue, 25 Nov 2014 14:18:33 +0530	[thread overview]
Message-ID: <CADGdYn6fAScrpz4Va=THtC1ZgT+rYN_gQuE6NnRaCiN4NErg5g@mail.gmail.com> (raw)
In-Reply-To: <CAPDyKFqE_qhrRs3X9s9juyPH_Zcq8vdE_amqKM3VUnMjHtL2Rg@mail.gmail.com>

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.

Regards,
Amit
>
> Kind regards
> Uffe
>
>>
>> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
>> ---
>>  drivers/base/power/domain.c |    3 ++-
>>  include/linux/pm_domain.h   |    7 +++++++
>>  2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
>> index fb83d4a..b0e1c2f 100644
>> --- a/drivers/base/power/domain.c
>> +++ b/drivers/base/power/domain.c
>> @@ -49,7 +49,7 @@
>>  static LIST_HEAD(gpd_list);
>>  static DEFINE_MUTEX(gpd_list_lock);
>>
>> -static struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
>> +struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
>>  {
>>         struct generic_pm_domain *genpd = NULL, *gpd;
>>
>> @@ -66,6 +66,7 @@ static struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
>>         mutex_unlock(&gpd_list_lock);
>>         return genpd;
>>  }
>> +EXPORT_SYMBOL_GPL(pm_genpd_lookup_name);
>>
>>  struct generic_pm_domain *dev_to_genpd(struct device *dev)
>>  {
>> diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
>> index 2e0e06d..aedcec3 100644
>> --- a/include/linux/pm_domain.h
>> +++ b/include/linux/pm_domain.h
>> @@ -150,6 +150,8 @@ extern int pm_genpd_name_poweron(const char *domain_name);
>>
>>  extern struct dev_power_governor simple_qos_governor;
>>  extern struct dev_power_governor pm_domain_always_on_gov;
>> +
>> +extern struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name);
>>  #else
>>
>>  static inline struct generic_pm_domain_data *dev_gpd_data(struct device *dev)
>> @@ -221,6 +223,11 @@ static inline int pm_genpd_name_poweron(const char *domain_name)
>>  {
>>         return -ENOSYS;
>>  }
>> +static inline
>> +struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
>> +{
>> +       return NULL;
>> +}
>>  #define simple_qos_governor NULL
>>  #define pm_domain_always_on_gov NULL
>>  #endif
>> --
>> 1.7.9.5
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2014-11-25  8:48 UTC|newest]

Thread overview: 57+ 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 12:52 ` 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   ` 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     ` 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     ` 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     ` 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     ` 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
2014-11-24 13:04     ` Amit Daniel Kachhap
2014-11-25  7:30     ` Ulf Hansson
2014-11-25  7:30       ` Ulf Hansson
2014-11-25  7:30       ` Ulf Hansson
2014-11-25  8:33       ` amit daniel kachhap
2014-11-25  8:33         ` amit daniel kachhap
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-24 13:04     ` Amit Daniel Kachhap
2014-11-25  7:35     ` Ulf Hansson
2014-11-25  7:35       ` Ulf Hansson
2014-11-25  7:35       ` Ulf Hansson
2014-11-25  8:48       ` amit daniel kachhap [this message]
2014-11-25  8:48         ` amit daniel kachhap
2014-11-25  8:48         ` amit daniel kachhap
2014-11-27 14:20         ` Ulf Hansson
2014-11-27 14:20           ` Ulf Hansson
2014-11-27 14:20           ` Ulf Hansson
2014-11-28  8:52           ` amit daniel kachhap
2014-11-28  8:52             ` amit daniel kachhap
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-24 13:04     ` Amit Daniel Kachhap
2014-11-25  7:59     ` Ulf Hansson
2014-11-25  7:59       ` Ulf Hansson
2014-11-25  7:59       ` Ulf Hansson
2014-11-25  8:57       ` amit daniel kachhap
2014-11-25  8:57         ` amit daniel kachhap
2014-11-25  8:57         ` amit daniel kachhap
2014-11-25  9:19         ` Geert Uytterhoeven
2014-11-25  9:19           ` Geert Uytterhoeven
2014-11-25  9:19           ` Geert Uytterhoeven
2014-12-03  8:36           ` Marek Szyprowski
2014-12-03  8:36             ` Marek Szyprowski
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     ` 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
2014-11-24 13:04     ` Amit Daniel Kachhap
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     ` Amit Daniel Kachhap
2014-11-24 13:04     ` Amit Daniel Kachhap
2014-11-24 13:04   ` [PATCH RFC v2 12/12] arm64: Kconfig: Enable PM_GENERIC_DOMAINS for exynos7 Amit Daniel Kachhap
2014-11-24 13:04     ` 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='CADGdYn6fAScrpz4Va=THtC1ZgT+rYN_gQuE6NnRaCiN4NErg5g@mail.gmail.com' \
    --to=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 \
    --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.