linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Michael Bohan <mbohan@codeaurora.org>
Cc: rnayak@ti.com, lrg@ti.com, LKML <linux-kernel@vger.kernel.org>,
	linux-arm-msm@vger.kernel.org
Subject: Re: Regulator supplies when using Device Tree
Date: Wed, 28 Mar 2012 20:33:42 +0100	[thread overview]
Message-ID: <20120328193341.GD3232@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4F736451.8020900@codeaurora.org>

[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]

On Wed, Mar 28, 2012 at 12:19:45PM -0700, Michael Bohan wrote:
> On 3/28/2012 3:09 AM, Mark Brown wrote:
> >On Tue, Mar 27, 2012 at 06:38:30PM -0700, Michael Bohan wrote:

> >Absolutely not, that would be broken.  The whole point here is that
> >supplies of all kinds are always requested with the name the chip uses
> >for the supply.

> Within the regulator driver, we currently have to do an
> of_get_property(of_node, "foo-supply", NULL) to determine whether
> the device has a supply, and thus whether we should assign
> rdesc->supply_name to "foo" or not when calling

No, this would be completely idiotic.  Please think about what I'm
saying here.  To repeat, supplies of all kinds are always requested with
the name the chip uses for the supply.  This means that any machine
binding is *totally* irrelevant to the regulator driver.

> regulator_register(). Is there a better way to do this? If we don't
> do this check for the case where a device does not have a supply
> specified in the Device Tree, then regulator_register() will fail.

Obviously there's a better way to do this.  For one thing as soon as we
find ourselves saying "let's open code this in every single driver"
we've got a clear abstraction problem...

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-03-28 19:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23  1:17 Regulator supplies when using Device Tree Michael Bohan
2012-03-26 13:00 ` Mark Brown
2012-03-28  1:38   ` Michael Bohan
2012-03-28 10:09     ` Mark Brown
2012-03-28 19:19       ` Michael Bohan
2012-03-28 19:33         ` Mark Brown [this message]
2012-03-29  0:06           ` Michael Bohan
2012-03-29  4:44             ` Rajendra Nayak
2012-03-29 11:08               ` Mark Brown
2012-03-29 11:11             ` Mark Brown
2012-03-30  1:18               ` Michael Bohan
2012-03-30 10:36                 ` Mark Brown
2012-04-02 17:35                   ` Michael Bohan
2012-04-02 21:22                     ` Mark Brown
2012-04-03  1:53                       ` Michael Bohan
2012-04-03 12:25                         ` 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=20120328193341.GD3232@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=mbohan@codeaurora.org \
    --cc=rnayak@ti.com \
    /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).