test: dm: fix broken dm_test_ofnode_phandle_ot and get_by_phandle_ot
authorChristian Marangi <ansuelsmth@gmail.com>
Sun, 10 Nov 2024 11:50:21 +0000 (12:50 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 6 Dec 2024 19:00:40 +0000 (13:00 -0600)
commit8f9cc56a5b0e6c2959508a9f8916bd7e5f32cf5f
tree4a38241c862993675b2bd8b5ba040381b5d2c246
parent1614347036716dd8fe55ed530cb7c0d7dc5994ed
test: dm: fix broken dm_test_ofnode_phandle_ot and get_by_phandle_ot

Fix broken dm_test_ofnode_phandle_ot test. They never actually worked
and were passing test by pure luck by having the same phandle index of
test.dts that coincicentally had #gpio-cells in the same index node.

It was sufficient to add a phandle to test.dts to make the test fail.

To correctly test these feature, make use oif the new OPs oftree to
parse phandle.

For consistency with the dm_test_ofnode_phandle, rework the test and
other.dts to use the same property with the other- prefix to every
node.

Also fix dm_test_ofnode_get_by_phandle_ot by making it more robust and
renaming the phandle property to other-phandle.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/dts/other.dts
test/dm/ofnode.c