From: Grant Likely <grant.likely@secretlab.ca>
To: Thierry Reding <thierry.reding@avionic-design.de>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-tegra@vger.kernel.org, Liam Girdwood <lrg@ti.com>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
linux-pci@vger.kernel.org, Rob Herring <rob.herring@calxeda.com>,
devicetree-discuss@lists.ozlabs.org,
Russell King <linux@arm.linux.org.uk>,
linux-arm-kernel@lists.infradead.org,
Colin Cross <ccross@android.com>, Olof Johansson <olof@lixom.net>
Subject: Re: [PATCH 05/11] tps6586x: Add device-tree support
Date: Thu, 08 Mar 2012 22:15:06 -0700 [thread overview]
Message-ID: <20120309051506.761B63E090F@localhost> (raw)
In-Reply-To: <20120308151545.GA23934@avionic-0098.mockup.avionic-design.de>
On Thu, 8 Mar 2012 16:15:46 +0100, Thierry Reding <thierry.reding@avionic-design.de> wrote:
> * Mark Brown wrote:
> > On Thu, Mar 08, 2012 at 03:51:25PM +0100, Thierry Reding wrote:
> >
> > > +- gpio-controller: mark the device as a GPIO controller
> > > +- regulators: list of regulators provided by this controller, must be in the
> > > + following order:
> > > + SM0, SM1, SM2, LDO0, LDO1, LDO2, LDO3, LDO4, LDO5, LDO6, LDO7, LDO8, LDO9
> >
> > This ordering requirement is fairly sad, if there are unused regulators
> > they still need to be listed even though...
It's worse than that; the DT provides absolutely no guarantees about the
ordering of either child nodes or properties.
> >
> > > + sm0_reg: sm0 {
> > > + regulator-min-microvolt = < 725000>;
> > > + regulator-max-microvolt = <1500000>;
> > > + regulator-boot-on;
> > > + regulator-always-on;
> > > + };
> > > +
> > > + sm1_reg: sm1 {
> >
> > ...they all seem to be explicitly named in the device tree so presumably
> > there's enough information in there for the driver to pick any set of
> > regulators in any order. This would be much nicer to use.
>
> I don't like it much either. The only reason that requirement exists is
> because it makes the assignment of the regulator ID (as defined in the
> include/linux/mfd/tps6586x.h header) very trivial. Would it be better to
> look up the ID based on the node name (sm0 --> TPS6586X_ID_SM_0, ...)?
>
> Then the only requirement would be that the names match.
Yes, please look up id via name. Alternately you can give each child node
a 'reg' property and put #address-cells = <1>; #size-cells = <0>; in the
parent (assuming the regulator number is a documented attribute of the
hardware and not just a convenient linux construct).
g.
next prev parent reply other threads:[~2012-03-09 5:24 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-08 14:51 [PATCH 00/11] ARM: tegra: Add PCIe device tree support Thierry Reding
2012-03-08 14:51 ` [PATCH 01/11] drivercore: Add driver probe deferral mechanism Thierry Reding
2012-03-19 23:12 ` Sylwester Nawrocki
2012-03-20 14:21 ` Grant Likely
2012-03-08 14:51 ` [PATCH 02/11] regulator: Support driver probe deferral Thierry Reding
2012-03-08 14:51 ` [PATCH 03/11] regulator: fixed: " Thierry Reding
2012-03-11 12:58 ` Mark Brown
2012-03-08 14:51 ` [PATCH 04/11] regulator: tps6586x: fix typo in debug message Thierry Reding
2012-03-08 19:08 ` Mark Brown
2012-03-08 14:51 ` [PATCH 05/11] tps6586x: Add device-tree support Thierry Reding
2012-03-08 15:06 ` Mark Brown
2012-03-08 15:15 ` Thierry Reding
2012-03-08 15:17 ` Mark Brown
2012-03-08 15:45 ` Thierry Reding
2012-03-09 5:15 ` Grant Likely [this message]
2012-03-09 7:53 ` Thierry Reding
2012-03-08 14:51 ` [PATCH 06/11] PCI: Keep pci_fixup_irqs() around after init Thierry Reding
2012-03-08 17:27 ` Bjorn Helgaas
2012-03-08 18:37 ` Thierry Reding
2012-03-08 18:41 ` Bjorn Helgaas
2012-03-08 14:51 ` [PATCH 07/11] ARM: pci: Keep pci_common_init() " Thierry Reding
2012-03-08 14:51 ` [PATCH 08/11] ARM: tegra: Move tegra_pcie_xclk_clamp() to PMC Thierry Reding
2012-03-08 19:50 ` Stephen Warren
2012-03-08 14:51 ` [PATCH 09/11] ARM: tegra: Rewrite PCIe support as a driver Thierry Reding
2012-03-08 20:09 ` Stephen Warren
2012-03-09 6:37 ` Thierry Reding
2012-03-09 16:42 ` Stephen Warren
2012-03-08 14:51 ` [PATCH 10/11] ARM: tegra: pcie: Add MSI support Thierry Reding
2012-03-08 21:14 ` Stephen Warren
2012-03-09 6:50 ` Thierry Reding
2012-03-09 16:45 ` Stephen Warren
2012-03-12 8:00 ` Thierry Reding
2012-03-12 16:57 ` Stephen Warren
2012-03-08 14:51 ` [PATCH 11/11] ARM: tegra: pcie: Add device tree support Thierry Reding
2012-03-08 21:31 ` Stephen Warren
2012-03-09 6:31 ` Thierry Reding
2012-03-09 16:47 ` Stephen Warren
2012-03-12 12:06 ` Mark Brown
2012-03-12 14:17 ` Thierry Reding
2012-03-12 14:23 ` Mark Brown
2012-03-12 14:28 ` Thierry Reding
2012-03-12 14:32 ` Mark Brown
2012-03-08 15:22 ` [PATCH 00/11] ARM: tegra: Add PCIe " Rob Herring
2012-03-08 15:43 ` Thierry Reding
2012-03-09 4:54 ` Grant Likely
2012-03-18 17:31 ` Olof Johansson
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=20120309051506.761B63E090F@localhost \
--to=grant.likely@secretlab.ca \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=ccross@android.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=lrg@ti.com \
--cc=olof@lixom.net \
--cc=rob.herring@calxeda.com \
--cc=thierry.reding@avionic-design.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;
as well as URLs for NNTP newsgroup(s).