dm: core: Provide ofnode_find_subnode_unit()
authorSimon Glass <sjg@chromium.org>
Sat, 11 Jan 2025 00:00:29 +0000 (17:00 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 22 Jan 2025 23:08:24 +0000 (17:08 -0600)
commit8985ff56b16dc6c04da2c96d48e7f6f54d04e3ff
treecccf61de5faa6550782765a05b1bd05b52919e09
parentaacc05b07d28e01bbbaf9037b3e8e1275e48701f
dm: core: Provide ofnode_find_subnode_unit()

The ofnode_find_subnode() function currently processes things two
different ways, so the treatment of unit addresses differs depending on
whether OF_LIVE is enabled or not.

Add a new version which uses the ofnode API and add a test to check that
unit addresses can be matched correctly. Leave the old function in place
for the !OF_LIVE case, to avoid a code-size increase, e.g. on
firefly-rk3288

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/ofnode.c
include/dm/ofnode.h
test/dm/ofnode.c