linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Laxman Dewangan
	<ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org"
	<olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
	Mark Brown
	<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
Cc: 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: Fri, 01 Jun 2012 13:23:24 -0600	[thread overview]
Message-ID: <4FC916AC.4060804@wwwdotorg.org> (raw)
In-Reply-To: <4FBBDE06.5080806-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On 05/22/2012 12:42 PM, Laxman Dewangan wrote:
> On Tuesday 22 May 2012 11:57 PM, Stephen Warren wrote:
>> On 05/22/2012 11:56 AM, Laxman Dewangan wrote:
>>> On Tuesday 22 May 2012 10:49 PM, Stephen Warren wrote:
>>>> On 05/22/2012 11:09 AM, Laxman Dewangan wrote:
>>>>> On Tuesday 22 May 2012 10:10 PM, Stephen Warren wrote:
>>>>>> On 05/22/2012 07:05 AM, Laxman Dewangan wrote:
>>>>>>> Add device info for the PMIC device tps65911 in tegra-cardhu
>>>>>>> dts file. This device supports the multiple regulator rails,
>>>>>>> gpio, interrupts.
>> ...
>>>>>> Nitpicky, but the labels might be more logical as reg_vdd1 rather
>>>>>> than
>>>>>> vdd1_reg, but not a big deal.
>>>>>>
>>>>>> So, please replace the line above with:
>>>>>>
>>>>>>       reg_vdd1: regulator@0 {
>>>>>>           reg =<0>;
>>>>> Why do we really require the reg at all?
>>>>> I dont think any usage of doing this.
>> Oh, perhaps you meant the reg property not "reg_" in the label name?
>>
>> It is required because the parent node has #address-cells and
>> #size-cells and because the node name itself has a unit address ("@nnn").
>>
> 
> But we can not put
>     reg_vdd1:regulator@0 {
>         ::::::::::::::
>     }
> 
> 
> due to their dt binding with their node names.

I spoke to Olof about this on IRC, and he also tended to agree that the
regulator node names should not be used directly.

However, Mark warned that changing this would be a bit painful because
there are already users of the existing scheme. It looks like that's
only tps65910 (which we haven't started using yet), db8500, and ab8500,
so probably not that big a deal.

We could probably amend of_regulator_match() to work in a
backwards-compatible fashion; to look for some name property in each
child node first, and then fall back to using the node name if that
resulted in no matches. That would allow db8500/ab8500 to be converted
at leisure.

We could either augment struct of_regulator_match with an integer ID
field for each regulator (which would perhaps make it slightly painful
to write the nodes and keep the IDs matched up), or add a new property
to each regulator provider node e.g. regulator-id which contained the
name that the regulator driver knows the regulator as (which would match
struct of_regulator_match.name), since the existing regulator-name
property is used for semantically different purposes.

That would result in:

> tps65911: tps65911@2d {
> 	compatible = "ti,tps65911";
> 	reg = <0x2d>;
> 
> 	#gpio-cells = <2>;
> 	gpio-controller;
> 
> 	regulators {
> 		#address-cells = <1>;
> 		#size-cells = <0>;
> 
> 		vdd1_reg: regulator@0 {
> 			reg = <0>;
> 			regulator-id = "vdd1"; /* Internal name */
> 			regulator-name = "vdd_1v2_gen"; /* Signal on schematic */
...
> 		};
> 
> 		vdd2_reg: regulator@1 {
> 			reg = <1>;
> 			regulator-id = "vdd2";
> 			regulator-name = "vdd_1v5_gen";
...

  parent reply	other threads:[~2012-06-01 19:23 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 [this message]
     [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
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=4FC916AC.4060804@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).