From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Add a power domain framework/uclass
Date: Mon, 25 Jul 2016 10:50:48 -0600 [thread overview]
Message-ID: <57964368.1060400@wwwdotorg.org> (raw)
In-Reply-To: <CAPnjgZ3EqF1N_An_hsmuLQYW1oHrSSMX8vjc1tC_nKnuKrAvgw@mail.gmail.com>
On 07/24/2016 08:07 PM, Simon Glass wrote:
> Hi Stephen,
>
> On 14 July 2016 at 22:17, Simon Glass <sjg@chromium.org> wrote:
>> Hi Stephen,
>>
>> On 13 July 2016 at 13:45, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> From: Stephen Warren <swarren@nvidia.com>
>>>
>>> Many SoCs allow power to be applied to or removed from portions of the SoC
>>> (power domains). This may be used to save power. This API provides the
>>> means to control such power management hardware.
>>>
>>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>>> ---
>>> I'll soon(?) send a Tegra186 power domain driver that implements this
>>> new subsystem. I'm waiting for all the relevant DT bindings to be
>>> reviewed as kernel patches first though.
...
>> Acked-by: Simon Glass <sjg@chromium.org>
>>
>> Could you add a command (with list/on/off subcommands) to control this also?
>
> Any thoughts on this?
>
> Applied to u-boot-dm, thanks!
Such a command sounds like a good idea. I'm a bit too swamped to do this
immediately though.
One issue to consider: How would the user specify which power domain to
control? There's no global namespace. Only individual drivers can parse
their own namespace, and there's no requirement that drivers identify
each powerdomain with e.g. a single integer or name, just like DT
specificiers can use multiple cells. I can think of two ways to handle this:
a) Add a new "op" function to the driver to allow converting the cmdline
arguments the user passed to the shell command into whatever value(s)
the driver uses to identify the power domain, e.g. "cmdline_xlate()".
This has the disadvantage of requiring extra code (although we could
provide a default implementation for the common code), but has the
advantage of allowing control over any powerdomain that any driver
implements.
b) Make the command take a DT property node name and index, and have the
command look the powerdomain ID up from DT. This has the disadvantage of
limiting control to powerdomains that are already added to the DT, but
does have the advantage of not requiring any driver code.
next prev parent reply other threads:[~2016-07-25 16:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 19:45 [U-Boot] [PATCH] Add a power domain framework/uclass Stephen Warren
2016-07-15 4:17 ` Simon Glass
2016-07-25 2:07 ` Simon Glass
2016-07-25 16:50 ` Stephen Warren [this message]
2016-08-01 1:01 ` Simon Glass
2016-08-01 15:17 ` Stephen Warren
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=57964368.1060400@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=u-boot@lists.denx.de \
/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