lkml.org 
[lkml]   [2012]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Regulator supplies when using Device Tree
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...
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-03-28 21:37    [W:0.086 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site