linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>,
	lrg@ti.com, rob.herring@calxeda.com, grant.likely@secretlab.ca,
	linus.walleij@linaro.org, lee.jones@linaro.org,
	swarren@wwwdotorg.org, devicetree-discuss@lists.ozlabs.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3 2/3] regulator: dt: regulator match by regulator-compatible
Date: Wed, 20 Jun 2012 20:40:52 +0000	[thread overview]
Message-ID: <201206202040.52291.arnd@arndb.de> (raw)
In-Reply-To: <20120620194609.GA4037@opensource.wolfsonmicro.com>

On Wednesday 20 June 2012, Mark Brown wrote:
> On Wed, Jun 20, 2012 at 07:24:09PM +0000, Arnd Bergmann wrote:
> 
> > 1. What is it that the new property can express that cannot already
> > be expressed by using the phandle.
> 
> As well as being able to refer to the object from within the device tree
> we also need to be able to tell what the object represents - we have a
> bunch of regulators in an array under a node for a PMIC and we want to
> know which regulator on the physical device each array entry corresponds
> to.  Previously this was being done by parsing the phandle name but that
> means we can't have more than one device with the same set of names.

I see.

But that sounds more like what the "reg" property does than what
the "compatible" property does for other devices. In other words, you
want to know which instance you are describing, not what kind of
object it is.

For a "compatible" property, I would expect two objects that have
the same register-level interface but are responsible for different
physical objects to have the same "compatible" values, but here
you specifically need distinct "regulator-compatible" values.
 
> > 2. Why is it called "regulator-compatible"? If it's similar to the
> > "compatible" property, don't you have to have a binding for each
> > possible string? If it's not related to the "compatible" property,
> > why is it named in a similar way?
> 
> Yes, there are bindings defined already for all the relevant devices.
> Elsewhere in the binding document you'll see a list of all the
> regulators on the PMIC and the names by which the device tree binding
> knows them.

Ah, so we just change the way how the binding refers to those names,
rather than the individual strings.

It makes much more sense now, so please let's make sure that explanation
ends up in the changelog.

I still have two more questions: 

* In case of tps65910, the individual regulators are all numbered, so
the driver can find them by their "reg" property. Should we still
mandate the use of the "regulator-compatible" property? It sounds
to me that we could better make it an optional property in those
cases.

* What is the difference between "regulator-name" and
"regulator-compatible"? Those are the same most of the time
in the patches, so can't we just make sure they are always the
same, and drop the confusingly named "regulator-compatible" one?

	Arnd

  parent reply	other threads:[~2012-06-20 20:41 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20 12:23 [PATCH V3 0/3] regulator: dt: add policy to match regulator with prop "regulator-compatible" Laxman Dewangan
2012-06-20 12:23 ` [PATCH V3 1/3] ARM: dts: db8500: add property "regulator-compatible" regulator node Laxman Dewangan
2012-06-20 18:48   ` Stephen Warren
2012-06-20 12:23 ` [PATCH V3 2/3] regulator: dt: regulator match by regulator-compatible Laxman Dewangan
2012-06-20 19:24   ` Arnd Bergmann
2012-06-20 19:46     ` Mark Brown
2012-06-20 19:51       ` Stephen Warren
2012-06-20 23:37         ` Mark Brown
2012-06-20 20:40       ` Arnd Bergmann [this message]
2012-06-20 21:01         ` Stephen Warren
2012-06-20 23:35           ` Mark Brown
2012-06-21 14:50             ` Arnd Bergmann
2012-06-21 16:14               ` Mark Brown
2012-06-21 17:17                 ` Arnd Bergmann
2012-06-21 17:31                   ` Stephen Warren
2012-06-21 21:03                     ` Arnd Bergmann
2012-06-21 22:52                       ` Mark Brown
2012-06-21 19:45                   ` Mark Brown
     [not found]                     ` <4FE397E5.1070707@firmworks.com>
2012-06-21 22:36                       ` Mark Brown
2012-06-20 23:15         ` Mark Brown
2012-06-22  6:13       ` Thierry Reding
2012-06-22  8:42         ` Mark Brown
2012-06-22  8:59           ` Thierry Reding
2012-06-22  9:12             ` Mark Brown
2012-06-26  9:02               ` Laxman Dewangan
2012-06-26  9:12                 ` Mark Brown
2012-06-26 10:13                   ` Lee Jones
2012-07-04 23:48                     ` Linus Walleij
2012-07-05  7:16                       ` Lee Jones
2012-06-20 12:23 ` [PATCH V3 3/3] regulator: dt: add policy to have property "regulator-compatible" Laxman Dewangan
2012-06-20 18:52   ` Stephen Warren
2012-07-03 19:25   ` Mark Brown
2012-07-04  7:03     ` Laxman Dewangan

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=201206202040.52291.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=ldewangan@nvidia.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=rob.herring@calxeda.com \
    --cc=swarren@wwwdotorg.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).