Re: [PATCH RESEND] ARM: tegra: set regulator full constraints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/13/2013 03:29 PM, Mark Brown wrote:
> On Wed, Nov 13, 2013 at 02:59:01PM -0700, Stephen Warren wrote:
>> On 11/13/2013 01:49 PM, Mark Brown wrote:
> 
>>> No, with DT you can say that if there is no DT binding configuring
>>> a given thing (clock, regulator, GPIO or whatever) then no amount
>>> of module loading will ever cause it to appear - this is what the
>>> flag in question controls.
> 
>> But we do have a binding for regulators, so wouldn't that flag always
>> be true?
> 
> In theory.  In practice people often add bindings for devices without
> including the regulators and then someone comes along and adds the
> regulators later, perhaps not even using a system with DT, and renders
> all existing DTs buggy.  This is generally miserable for everyone so
> it's better if we're liberal in what we accept.

But that's a per-binding issue. Earlier, you wrote:

>> The only issue you may have to watch out for is: When is
>> regulator_init() called (i.e. when does core_initcall happen) relative
>> to when driver probe()s can be called? If it's earlier, then
>> core_initcall is early enough I suspect.
> 
> What I said was to set this up when we hand the DT over to the DT code
> to be parsed so that we don't need to worry about any gaps like that,
> it seems like a more direct solution than worrying about initcall
> ordering.

That sounds like a system-global flag, not a per-device/binding flag.
Has the conversation shifted topics? And indeed, I've been talking about
the system-global has_full_constraints flag all along here.

>> Perhaps you can suggest a name for the flag, and a specific set of
>> conditions when it will have specific values. That might help me
>> understand what you mean.
> 
> Well, of_have_populated_dt() is essentially doing the same thing
> (probably, I don't know if it's set at quite the right time) - it's
> saying we have a DT.  We could even change the users to check that as
> well if it's doing the right thing.

But the regulator code already calls of_have_populated_dt() in order to
determine whether to set has_full_constraints = true; The only issue is
that it does it too late. If of_have_populated_dt() is the flag that the
code should key off, what's wrong with the suggestion I made yesterday
to simply move the existing code (that uses of_have_populated_dt()) to
an earlier location?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux