DTS language enhancements
Kumar Gala
galak at kernel.crashing.org
Fri Oct 3 15:08:54 EST 2008
On Oct 2, 2008, at 11:37 PM, David Gibson wrote:
> Node-content expressions
> ------------------------
>
> Literals are node definitions in the current format:
> {
> prop = <bytestring expression>;
> somesubnode at whatever <node content expression>;
> }
>
> ?: would also be supported here (again, first argument integer, second
> and third are node-content).
>
> I'm less sure what other operators we'll need here - probably need to
> build these based on actual usage examples. Likely candidates,
> however are:
> - set property
> e.g. /setprop/({ }, "reg", < 17 >) == { reg = < 17 >; }
> - remove property
> e.g. /delprop({ reg = <17>; }, "reg") == { }
> - add subnode
> e.g. /addnode/({ }, "subnode at 17", {reg = <17>;}) ==
> { subnode at 17 { reg = <17>; }; }
> - merge
should we have /delnode/
> e.g. /merge/({foo = "abc";}, {bar = <17>;}) == {foo = "abc";
> bar=<17>;}
> (this would recurse down subnodes with identical names)
> - get subnode
> e.g. /getnode/({ subnode { foo = "bar"; }; }, "subnode") ==
> { foo = "bar"; }
> - get property (result of this is a bytestring, not a
> node-content expression)
> e.g. /getprop/({ foo = "bar"; }, "foo") = "bar"
This is very interesting and seems to address some functionality I've
talked to Jon about us needing to modify and update nodes.
- k
More information about the devicetree-discuss
mailing list