devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: "J, KEERTHY" <j-keerthy@ti.com>
Cc: "gg@slimlogic.co.uk" <gg@slimlogic.co.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	"broonie@opensource.wolfsonmicro.com"
	<broonie@opensource.wolfsonmicro.com>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	"rob@landley.net" <rob@landley.net>,
	"sameo@linux.intel.com" <sameo@linux.intel.com>,
	"wim@iguana.be" <wim@iguana.be>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"Kristo, Tero" <t-kristo@ti.com>,
	"lee.jones@linaro.org" <lee.jones@linaro.org>,
	Ian Lartey <ian@slimlogic.co.uk>
Subject: Re: [PATCH v2] mfd: DT bindings for the palmas family MFD
Date: Thu, 06 Jun 2013 09:53:41 -0600	[thread overview]
Message-ID: <51B0B085.7000908@wwwdotorg.org> (raw)
In-Reply-To: <DC88CAD03C0052499C1907B327FC63229EA0E9@DBDE04.ent.ti.com>

On 06/05/2013 09:34 PM, J, KEERTHY wrote:
> Hi Stephen,
> 
> Thanks for the quick review.
> 
> Stephen Warren wrote at Wednesday, June 05, 2013 10:44 PM:
>> On 06/04/2013 02:41 AM, J Keerthy wrote:
>>> From: Graeme Gregory <gg@slimlogic.co.uk>
>>>
>>> Add the various binding files for the palmas family of chips. There is
>>> a top level MFD binding then a seperate binding for regulators IP
>> blocks on chips.
...
>> Oh, one question though: How does the regulator driver determine the
>> register address of the regulator sub-device within the overall PMIC?
>> Presumably if these are pluggable independent modules, that could
>> change depending on which overall chip the PMIC device is plugged into.
>> don't you need a reg property to specify that?
> 
> The variants have identical register addresses. These are not pluggable
> Independent modules. All the variants come with all the regulators
> Listed above in general. The driver today has a statically defined
> Array of all the above mentioned regulators with their addresses.
>  
> drivers/regulator/palmas-regulator.c
> 
> Line 38.

I meant the I2C address used to communicate with the regulator registers
really, and I suppose the base address of the regulator register block.

In the driver, I see this is handled by the top-level Palmas driver
creating a regmap object which the regulator driver used. This keeps the
regulator driver completely unaware of these issues, only the top-level
chip driver cares about this, which is fine.

While that justification is in terms of OS-specific code, the basic
argument can be applied to the HW itself (the top-level chip implies the
I2C address and any register offset), so this really is a HW-driven
argument, so I guess it's fine not having a reg property in the
top-level regulator node.

One question though: I wonder why if the HW IP blocks aren't completely
independent modules that can be mixed/matched together to form new
chips, there's even a need for a separate regulator node with its own
compatible value. Still, I suppose it's a valid way to construct the DT
either way, so it's fine.

  reply	other threads:[~2013-06-06 15:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04  8:41 [PATCH v2] mfd: DT bindings for the palmas family MFD J Keerthy
2013-06-04 12:14 ` Lee Jones
2013-06-05  4:24   ` J, KEERTHY
2013-06-05 17:13 ` Stephen Warren
2013-06-06  3:34   ` J, KEERTHY
2013-06-06 15:53     ` Stephen Warren [this message]
2013-06-06  0:02 ` Grant Likely
2013-06-06  3:38   ` J, KEERTHY

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=51B0B085.7000908@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=gg@slimlogic.co.uk \
    --cc=ian@slimlogic.co.uk \
    --cc=j-keerthy@ti.com \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=sameo@linux.intel.com \
    --cc=t-kristo@ti.com \
    --cc=wim@iguana.be \
    /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).