[RFC PATCH 09/11] DT: regulator: Helper to extract regulator node based on supply name

Grant Likely grant.likely at secretlab.ca
Thu Sep 15 18:50:35 EDT 2011


On Thu, Sep 15, 2011 at 02:54:16PM +0100, Mark Brown wrote:
> On Thu, Sep 15, 2011 at 04:52:05PM +0530, Rajendra Nayak wrote:
> 
> > 		regulator = <&regulator1>,<&regulator2>;
> > 		regulator-names = "supply1","supply2";
> > 	};
> 
> This syntax is really painful - we're relying on keeping two arrays in
> sync which isn't good for legibility or robustness.  I'd expect
> something like having a property with the supply name referencing the
> regulator node concerned like:
> 
> 	dbvdd = <&regulator1>;
> 	dcvdd = <&regulator2>;
> 
> or something.  Keeping the two arrays separate doesn't seem great.

We've got two competing approaches here.  For reg and interrupts, the
proposal on the table that we talked about at LPC is to do reg-names
and interrupts-names so as to preserve the existing semantics of the
reg and interrupts properties.  For gpios we're using the binding
"<name>-gpios" for named gpio references.  There isn't the same
pressure to preserve existing bindings in that case.  I'm okay with
either approach, providing that "-regulator" is encoded into the name.

g.




More information about the linux-arm-kernel mailing list