dm: core: Add a way to obtain a string list
authorSimon Glass <sjg@chromium.org>
Sat, 23 Oct 2021 23:26:07 +0000 (17:26 -0600)
committerSimon Glass <sjg@chromium.org>
Sun, 28 Nov 2021 23:51:51 +0000 (16:51 -0700)
commit075bfc9575aedca15e61f5f1cfa300409e2979fe
treef75d1acaafdef7a48bd225151a361bd25fdb021e
parent32c6a8e1f803e2a42fa7bf76f23231736841bfc0
dm: core: Add a way to obtain a string list

At present we support reading a string list a string at a time. Apart
from being inefficient, this makes it impossible to separate reading of
the devicetree into the of_to_plat() method where it belongs, since any
code which needs access to the string must read it from the devicetree.

Add a function which returns the string property as an array of pointers
to the strings, which is easily used by clients.

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