linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Axel Haslam <ahaslam@baylibre.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Ulf Hansson" <ulf.hansson@linaro.org>,
	"Kevin Hilman" <khilman@linaro.org>,
	"Krzysztof Kozłowski" <k.kozlowski.k@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"Benoit Cousson" <bcousson@baylibre.com>,
	"Linux PM list" <linux-pm@vger.kernel.org>
Subject: Re: [RFC v4 1/8] PM / Domains: structure changes for multiple states
Date: Wed, 22 Apr 2015 18:26:23 +0200	[thread overview]
Message-ID: <5537CBAF.8050009@baylibre.com> (raw)
In-Reply-To: <CAMuHMdU2nfmJsoRwAWs+Lxfv22fWVGSBVw6SHOe6BE4yWWJoxw@mail.gmail.com>

Hi Geert,

On 22/04/2015 15:57, Geert Uytterhoeven wrote:
> Hi Axel,
>
> On Wed, Apr 22, 2015 at 3:23 PM, Axel Haslam <ahaslam@baylibre.com> wrote:
>>>> if the genpd is initially off, the user should set the
>>>> .init_state field when registering the genpd,
>>>> so that genpd knows which callbacks to call to set the
>>>> domain to on.
>>>
>>> The initial state may depend on various factors (hardware default,
>>> boot loader, previously loaded kernel, ...). This is even true with the
>>> current binary states.
>>
>> This would mean that the inital state of the genpd cannot be
>> hardcoded right?
>
> Indeed. And it should be filled in by the platform code before registration.
>
>>> What about keeping the .power_o{ff,n}() callbacks in struct
>>> generic_pm_domain,
>>> but adding a state index parameter to the callbacks?
>>> That would save even more memory on systems where all callbacks are
>>> identical.
>>
>> makes sense.
>
> It will complicate compilability/bisectability, though.
>

since the genpd pointer is allready an argument to the .power_o{ff,n}() 
callbacks, it would be simpler if the platform could check 
genpd->target_state to know what state is powering on/off to, instead of 
adding a new argument.

That way i can remove the power on/off callbacks from the state array,
and there are no big issues with bisectability.

regards,
Axel

> Gr{oetje,eeting}s,
>
>                          Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                  -- Linus Torvalds
>

  reply	other threads:[~2015-04-22 16:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22  9:45 [RFC v4 0/8] genpd multiple states v4 ahaslam
2015-04-22  9:45 ` [RFC v4 1/8] PM / Domains: structure changes for multiple states ahaslam
2015-04-22 11:17   ` Geert Uytterhoeven
2015-04-22 13:23     ` Axel Haslam
2015-04-22 13:57       ` Geert Uytterhoeven
2015-04-22 16:26         ` Axel Haslam [this message]
2015-04-22 14:50       ` Axel Haslam
2015-04-22  9:45 ` [RFC v4 2/8] PM / Domains: select deepest state ahaslam
2015-04-22  9:45 ` [RFC v4 3/8] ARM: s3c64xx: pm: Convert to multiple states ahaslam
2015-04-22  9:45 ` [RFC v4 4/8] ARM: exynos: " ahaslam
2015-04-22  9:45 ` [RFC v4 5/8] ARM: r8a7779: " ahaslam
2015-04-22  9:45 ` [RFC v4 6/8] ARM: rmobile: " ahaslam
2015-04-22  9:45 ` [RFC v4 7/8] ARM: ux500: " ahaslam
2015-04-22  9:45 ` [RFC v4 8/8] PM / Domains: remove old power on/off callbacks ahaslam

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=5537CBAF.8050009@baylibre.com \
    --to=ahaslam@baylibre.com \
    --cc=bcousson@baylibre.com \
    --cc=geert@linux-m68k.org \
    --cc=k.kozlowski.k@gmail.com \
    --cc=khilman@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --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).