summaryrefslogtreecommitdiff
path: root/tests/trees.S
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-10-16 13:58:25 +1000
committerJon Loeliger <jdl@freescale.com>2007-10-16 07:41:37 -0500
commit333542fabf8720b881e992a5abca32ef4bcb841a (patch)
tree98efc3d886cbc5b5c999b40b8c05737d4e740b0c /tests/trees.S
parent121acdec91f269b3efb4b5ac45820f0d1a3b37a1 (diff)
downloaddevice-tree-compiler-333542fabf8720b881e992a5abca32ef4bcb841a.tar.gz
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>
Diffstat (limited to 'tests/trees.S')
-rw-r--r--tests/trees.S5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/trees.S b/tests/trees.S
index bb662a6..c0fbaf6 100644
--- a/tests/trees.S
+++ b/tests/trees.S
@@ -83,13 +83,16 @@ test_tree1_rsvmap:
test_tree1_struct:
BEGIN_NODE("")
+ PROP_STR(test_tree1, compatible, "test_tree1")
PROP_INT(test_tree1, prop_int, TEST_VALUE_1)
PROP_STR(test_tree1, prop_str, TEST_STRING_1)
BEGIN_NODE("subnode@1")
+ PROP_STR(test_tree1, compatible, "subnode1")
PROP_INT(test_tree1, prop_int, TEST_VALUE_1)
BEGIN_NODE("subsubnode")
+ PROP_STR(test_tree1, compatible, "subsubnode1\0subsubnode")
PROP_INT(test_tree1, prop_int, TEST_VALUE_1)
END_NODE
END_NODE
@@ -98,6 +101,7 @@ test_tree1_struct:
PROP_INT(test_tree1, prop_int, TEST_VALUE_2)
BEGIN_NODE("subsubnode@0")
+ PROP_STR(test_tree1, compatible, "subsubnode2\0subsubnode")
PROP_INT(test_tree1, prop_int, TEST_VALUE_2)
END_NODE
END_NODE
@@ -106,6 +110,7 @@ test_tree1_struct:
FDTLONG(FDT_END)
test_tree1_strings:
+ STRING(test_tree1, compatible, "compatible")
STRING(test_tree1, prop_int, "prop-int")
STRING(test_tree1, prop_str, "prop-str")
test_tree1_end: