mirror of
https://github.com/dgibson/dtc.git
synced 2026-05-12 19:53:02 -04:00
libfdt: Add functions for handling the "compatible" property
This patch adds functions for dealing with the compatible property. fdt_node_check_compatible() can be used to determine whether a node is compatible with a given string and fdt_node_offset_by_compatible() locates nodes with a given compatible string. Testcases for these functions are also included. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
121acdec91
commit
333542fabf
9 changed files with 199 additions and 1 deletions
|
|
@ -2,13 +2,16 @@
|
|||
/memreserve/ abcd1234 00001234;
|
||||
|
||||
/ {
|
||||
compatible = "test_tree1";
|
||||
prop-int = <deadbeef>;
|
||||
prop-str = "hello world";
|
||||
|
||||
subnode@1 {
|
||||
compatible = "subnode1";
|
||||
prop-int = <deadbeef>;
|
||||
|
||||
subsubnode {
|
||||
compatible = "subsubnode1", "subsubnode";
|
||||
prop-int = <deadbeef>;
|
||||
};
|
||||
};
|
||||
|
|
@ -17,6 +20,7 @@
|
|||
prop-int = <abcd1234>;
|
||||
|
||||
subsubnode@0 {
|
||||
compatible = "subsubnode2", "subsubnode";
|
||||
prop-int = <abcd1234>;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue