d2a9da0458
At present, the fdt_subnode_offset() and fdt_path_offset() functions in libfdt require the exact name of the nodes in question be passed, including unit address. This is contrary to traditional OF-like finddevice() behaviour, which allows the unit address to be omitted (which is useful when the device name is unambiguous without the address). This patch introduces similar behaviour to fdt_subnode_offset_namelen(), and hence to fdt_subnode_offset() and fdt_path_offset() which are implemented in terms of the former. The unit address can be omitted from the given node name. If this is ambiguous, the first such node in the flattened tree will be selected (this behaviour is consistent with IEEE1275 which specifies only that an arbitrary node matching the given information be selected). This very small change is then followed by many more diffs which change the test examples and testcases to exercise this behaviour. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> |
||
---|---|---|
.. | ||
base01.asm | ||
base01.cmd | ||
base01.dts | ||
base01.stderr | ||
del_node.c | ||
del_property.c | ||
dtc.sh | ||
dumptrees.c | ||
empty.dts | ||
find_property.c | ||
get_name.c | ||
get_path.c | ||
getprop.c | ||
label01.dts | ||
Makefile.tests | ||
move_and_save.c | ||
node_offset_by_prop_value.c | ||
nop_node.c | ||
nop_property.c | ||
notfound.c | ||
open_pack.c | ||
parent_offset.c | ||
path_offset.c | ||
root_node.c | ||
run_tests.sh | ||
rw_tree1.c | ||
setprop.c | ||
setprop_inplace.c | ||
subnode_offset.c | ||
supernode_atdepth_offset.c | ||
sw_tree1.c | ||
test01.asm | ||
test01.dts | ||
test01.stderr | ||
test_tree1.dts | ||
testdata.h | ||
tests.h | ||
testutils.c | ||
trees.S | ||
truncated_property.c |