linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lina.iyer@linaro.org (Lina Iyer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/8] PM / Domains: Allow domain power states to be read from DT
Date: Thu, 6 Oct 2016 09:44:39 -0600	[thread overview]
Message-ID: <20161006154439.GC28930@linaro.org> (raw)
In-Reply-To: <CAMuHMdU4HiauULf4fX67Cwj1GQmEExBiu4WyQPJBbj=xNg0eEQ@mail.gmail.com>

On Thu, Oct 06 2016 at 02:04 -0600, Geert Uytterhoeven wrote:
>Hi Lina,
>
>On Wed, Oct 5, 2016 at 10:31 PM, Lina Iyer <lina.iyer@linaro.org> wrote:
>> This patch allows domains to define idle states in the DT. SoC's can
>> define domain idle states in DT using the "domain-idle-states" property
>> of the domain provider. Calling of_pm_genpd_init() will  read the idle
>> states and initialize the genpd for the domain.
>>
>> In addition to the entry and exit latency for idle state, also add
>> residency_ns, param and of_node property to each state. A domain idling
>> in a state is only power effecient if it stays idle for a certain period
>> in that state. The residency provides this minimum time for the idle
>> state to provide power benefits. The param is a state specific u32 value
>> that the platform may use for that idle state.
>>
>> This patch is based on the original patch by Marc Titinger.
>>
>> Signed-off-by: Marc Titinger <mtitinger+renesas@baylibre.com>
>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>> Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
>> ---
>>  drivers/base/power/domain.c | 103 ++++++++++++++++++++++++++++++++++++++++++++
>>  include/linux/pm_domain.h   |   8 ++++
>>  2 files changed, 111 insertions(+)
>>
>> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
>> index 740afa9..368a5b8 100644
>> --- a/drivers/base/power/domain.c
>> +++ b/drivers/base/power/domain.c
>> @@ -1895,6 +1895,109 @@ out:
>>         return ret ? -EPROBE_DEFER : 0;
>>  }
>>  EXPORT_SYMBOL_GPL(genpd_dev_pm_attach);
>> +
>> +static const struct of_device_id idle_state_match[] = {
>> +       { .compatible = "arm,idle-state", },
>
>Do we want ARM-specific compatible values without an #ifdef in drivers/base/?
>
>I know we already have "samsung,power-domain".
>Perhaps that should be protected by #ifdef, too.
>
The arm,idle-state DT binding is re-used here to describe domain idle
states, because that is exactly what we need here. The binding is not
dependent on the ARM architecture, so we won't need a #ifdef around
this. I do agree that using this compatible is not very intuitive.

Thanks,
Lina

  reply	other threads:[~2016-10-06 15:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05 20:31 [PATCH 0/8] PM / Domains: DT support for domain idle states & atomic PM domains Lina Iyer
2016-10-05 20:31 ` [PATCH 1/8] PM / Domains: Make genpd state allocation dynamic Lina Iyer
2016-10-06  8:36   ` Ulf Hansson
2016-10-06 15:40     ` Lina Iyer
2016-10-06 19:45       ` Ulf Hansson
2016-10-06 20:57         ` Lina Iyer
2016-10-07  8:39           ` Ulf Hansson
2016-10-05 20:31 ` [PATCH 2/8] PM / Domain: Add residency property to genpd states Lina Iyer
2016-10-06  8:38   ` Ulf Hansson
2016-10-05 20:31 ` [PATCH 3/8] PM / Domains: Allow domain power states to be read from DT Lina Iyer
2016-10-06  8:04   ` Geert Uytterhoeven
2016-10-06 15:44     ` Lina Iyer [this message]
2016-10-06  9:47   ` Ulf Hansson
2016-10-06 15:53     ` Lina Iyer
2016-10-06 15:54     ` Lina Iyer
2016-10-05 20:31 ` [PATCH 4/8] PM / Domains: Add fwnode provider to genpd states Lina Iyer
2016-10-06 12:01   ` Ulf Hansson
2016-10-06 15:55     ` Lina Iyer
2016-10-05 20:31 ` [PATCH 5/8] dt/bindings: Update binding for PM domain idle states Lina Iyer
2016-10-06  8:06   ` Geert Uytterhoeven
2016-10-06  8:09     ` Geert Uytterhoeven
2016-10-06 15:56       ` Lina Iyer
2016-10-05 20:31 ` [PATCH 6/8] PM / Domains: Abstract genpd locking Lina Iyer
2016-10-06 10:56   ` Ulf Hansson
2016-10-06 15:56     ` Lina Iyer
2016-10-05 20:31 ` [PATCH 7/8] PM / Domains: Support IRQ safe PM domains Lina Iyer
2016-10-06 11:34   ` Ulf Hansson
2016-10-05 20:31 ` [PATCH 8/8] PM / doc: Update device documentation for devices in " Lina Iyer
2016-10-06 11:48   ` Ulf Hansson
2016-10-05 20:38 ` [PATCH 0/8] PM / Domains: DT support for domain idle states & atomic " Lina Iyer

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=20161006154439.GC28930@linaro.org \
    --to=lina.iyer@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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).