linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Mark Brown
	<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
Cc: Laxman Dewangan
	<ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org"
	<olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
	Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org"
	<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 2/2] ARM: dt: tegra: cardhu: register core regulator tps65911
Date: Mon, 11 Jun 2012 09:56:14 -0600	[thread overview]
Message-ID: <4FD6151E.8010405@wwwdotorg.org> (raw)
In-Reply-To: <20120611025717.GE28211-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>

On 06/10/2012 08:57 PM, Mark Brown wrote:
> On Fri, Jun 08, 2012 at 10:24:06PM -0600, Stephen Warren wrote:
>> On 06/08/2012 09:06 PM, Mark Brown wrote:
> 
>>> If we're going to do this we need to update all the existing DT bindings
>>> for drivers that use single node regulators like this.  Please also
>>> change the name used for the property to regulator-compatible to make it
>>> clear that the idea is the same as normal compatible properties.
> 
>> I'm not sure of the logic behind naming the property
>> "regulator-compatible"; the standard compatible property identifies that
>> the node is of a particular type/class, whereas the regulator-id in the
>> example Laxman quoted would indicate the specific identity/object. Those
>> seem like different things.
> 
> They're both doing the same thing - up until you get the second register
> compatible device a compatible binding is referencing a specific thing
> too.  It's just saying "handle this like an X".

I believe there's a big semantic difference here.

For every node with compatible="foo", you find a driver for "foo" and
instantiate it. This will work for any number of nodes with that
compatible value. The nodes are completely independent and there are no
particular requirements re: what the parent of those nodes are, beyond
being a bus of an appropriate type such as any old I2C bus.

However, with the regulator identifiers, it's almost exactly the opposite:

* There's no generic "search all busses in the system for this regulator
type", but rather once a particular type of regulator chip gets
instantiated, that chip's HW design defines which specific regulators it
contains, and nodes for those regulators may exist as children of the
regulator chip itself, and nowhere else. The individual driver is then
going to look for child nodes with specific
regulator-id/regulator-compatible values, not some arbitrary centralized
table of possible values.

* Each regulator-id/regulator-compatible value identifies a specific
individual regulator within the chip that contains it. There is only one
of each named regulator, since that's what exists in HW. So, this is
about configuring HW that we know exists (because it's part of the HW
represented by the parent node for the chip) rather than defining which
HW is present on unprobeable busses, as the device-level compatible does.

Given those differences, I really think that using "compatible" in the
name of the property is just going to cause confusion.

  parent reply	other threads:[~2012-06-11 15:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22 13:05 [PATCH 1/2] ARM: tegra: config: enable TPS65910 drivers Laxman Dewangan
2012-05-22 13:05 ` [PATCH 2/2] ARM: dt: tegra: cardhu: register core regulator tps65911 Laxman Dewangan
     [not found]   ` <1337691917-15040-2-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-22 16:40     ` Stephen Warren
     [not found]       ` <4FBBC192.7030900-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-22 17:09         ` Laxman Dewangan
     [not found]           ` <4FBBC830.2060802-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-22 17:19             ` Stephen Warren
     [not found]               ` <4FBBCA8F.3050903-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-22 17:56                 ` Laxman Dewangan
     [not found]                   ` <4FBBD33C.8020802-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-05-22 18:27                     ` Stephen Warren
     [not found]                       ` <4FBBDA97.6000006-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-22 18:42                         ` Laxman Dewangan
     [not found]                           ` <4FBBDE06.5080806-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-01 19:23                             ` Stephen Warren
     [not found]                               ` <4FC916AC.4060804-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-01 20:40                                 ` Mark Brown
     [not found]                                   ` <20120601204052.GB4258-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-06-01 20:44                                     ` Stephen Warren
     [not found]                                       ` <4FC92990.5030104-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-01 21:04                                         ` Mark Brown
     [not found]                                           ` <20120601210451.GC4258-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-06-02 21:19                                             ` Olof Johansson
     [not found]                                               ` <CAOesGMgYAR938F8PnVWaymzMBQwDKeAiUgEP81bv2nN14NmLGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-03  2:45                                                 ` Rob Herring
     [not found]                                                   ` <4FCACFB6.2060601-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-06-03 12:05                                                     ` Mark Brown
     [not found]                                                       ` <20120603120506.GG4258-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-06-03 16:11                                                         ` Mitch Bradley
     [not found]                                                           ` <4FCB8CA9.40602-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2012-06-03 18:37                                                             ` Mark Brown
2012-06-03 11:55                                                 ` Mark Brown
2012-06-08 19:22                                 ` Laxman Dewangan
2012-06-09  3:06                                   ` Mark Brown
     [not found]                                     ` <20120609030608.GF3924-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-06-09  4:24                                       ` Stephen Warren
     [not found]                                         ` <4FD2CFE6.9070500-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-11  2:57                                           ` Mark Brown
     [not found]                                             ` <20120611025717.GE28211-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-06-11 15:56                                               ` Stephen Warren [this message]
2012-06-11 16:20                                                 ` Mark Brown

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=4FD6151E.8010405@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
    --cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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).