DTS language enhancements

Scott Wood scottwood at freescale.com
Fri Oct 10 02:08:50 EST 2008


On Thu, Oct 09, 2008 at 01:27:22PM +1100, David Gibson wrote:
> On Tue, Oct 07, 2008 at 11:50:38AM -0500, Scott Wood wrote:
> > On Tue, Oct 07, 2008 at 12:41:03PM +1100, David Gibson wrote:
> > > > Instead of /addnode/, how about an alternate version of (or option to)
> > > > /merge/ that merges the second tree with the contents of the first,
> > > 
> > > Um.. I don't entirely see how this variant of /merge/ would differ
> > > from /addnode/.
> > 
> > /addnode/ can only add one node at a time, and has an different syntax
> > than normal for representing the node to be added (name is split from
> > body).  /mergeunder/ could add any number of nodes and/or properties,
> > and would use more normal syntax.
> 
> Um.. in that case I don't see how this differs from the original
> /merge/.

I guess the issue is that /merge/ is incompletely specified.  The example
showed it taking anonymous trees as parameters; are the parameters always
wrapped as such, or can named nodes be passed directly?  In the latter
case, /mergeunder/ was intended as a way of dereferencing the former
argument so as to place things inside it rather than create a new
anonymous node containing both, without needing to know the
name/unit-address of the named node.

An alternative would be a function to extract the name of non-anonymous
nodes, which could be used to build a matching subnode in the second
/merge/ argument.

> > We probably should have added comma-delimiting when we switched to
> > decimal-by-default.
> 
> Maybe, but its done now.  I really don't think requiring parens aroud
> expressions is that big an imposition.

Agreed; I may find it as ugly as you find identifier prefixes, but we
don't have much of a choice if we want to retain compatibility.

-Scott



More information about the devicetree-discuss mailing list