45013d8619
dtc currently allows the contents of properties to be changed, and the contents of nodes to be added to. There are situations where removing properties or nodes may be useful. This change implements the following syntax to do that: / { /delete-property/ propname; /delete-node/ nodename; }; or: /delete-node/ &noderef; Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: David Gibson <david@gibson.dropbear.id.au>
68 lines
738 B
Text
68 lines
738 B
Text
/dts-v1/;
|
|
|
|
/include/ "test_tree1_body.dtsi"
|
|
|
|
/ {
|
|
nonexistant-property = <0xdeadbeef>;
|
|
|
|
nonexistant-subnode {
|
|
prop-int = <1>;
|
|
};
|
|
|
|
dellabel: deleted-by-label {
|
|
prop-int = <1>;
|
|
};
|
|
|
|
subnode@1 {
|
|
delete-this-str = "deadbeef";
|
|
};
|
|
|
|
};
|
|
|
|
/ {
|
|
/delete-property/ nonexistant-property;
|
|
|
|
/delete-node/ nonexistant-subnode;
|
|
|
|
subnode@1 {
|
|
/delete-property/ delete-this-str;
|
|
};
|
|
};
|
|
|
|
/delete-node/ &dellabel;
|
|
|
|
/ {
|
|
/delete-property/ prop-str;
|
|
};
|
|
|
|
/ {
|
|
prop-str = "hello world";
|
|
};
|
|
|
|
/ {
|
|
subnode@1 {
|
|
/delete-node/ ss1;
|
|
};
|
|
};
|
|
|
|
/ {
|
|
subnode@1 {
|
|
ss1 {
|
|
};
|
|
};
|
|
};
|
|
|
|
/{
|
|
duplabel1: foo1 = "bar";
|
|
duplabel2: foo2 = "bar";
|
|
};
|
|
|
|
/{
|
|
duplabel1: baz1 = "qux";
|
|
duplabel2: baz2 = "qux";
|
|
};
|
|
|
|
/{
|
|
/delete-property/ foo1;
|
|
/delete-property/ baz2;
|
|
};
|