Grant Likely wrote:
Okay.  So the redefinition of nodes feature got implemented far faster
than I expected it would.  Woohoo!  :-)

That leaves the last bit that I really care about; deleting nodes and
properties.  I can probably find the time to implement the C code for
this, but have no idea how to do the grammer, and I don't think we've
got a consensus on syntax.

Given the following tree...

/ {
        child-label: child {
                prop = <0xbad>;
                grandchild-label: grandchild {
                };
        };
};

...here are the use cases that I see as important (plus some suggested
syntax.  I'm not happy with it though, and I'm open to better ideas).

1) Deleting a property from a node:
&child-label {
        /* syntax to delete "prop" property */
        delete-prop("prop");
        ^prop;  /* this isn't very good, hard to differentiate from
node deletion */
        __delete_property = "prop";
};

2) Delete a child node:
&child-label {
        /* syntax to delete "grandchild" node */
        delete-node("grandchild");
        ^grandchild;
        __delete_node = "grandchild";
        grandchild = ^{};
};

3) Delete a labelled node from the top level:
delete-node(&grandchild-label);

I vote for the function-like option -- delete-prop("prop"), etc.

-Scott
_______________________________________________
devicetree-discuss mailing list
[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss

Reply via email to