dm: core: Allow writing to a flat tree with ofnode
authorSimon Glass <sjg@chromium.org>
Sat, 30 Jul 2022 21:52:13 +0000 (15:52 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 12 Aug 2022 12:14:24 +0000 (08:14 -0400)
commit39e42be12b9456e604ac3e228973b1cb1136864c
tree14b0f51e7ad986d730b39d8b0bf0440ddf1b5659
parent7b1dfc9fd7e2efed345c3fe9a2412b5300ac285e
dm: core: Allow writing to a flat tree with ofnode

In generally it is not permitted to implement an ofnode function only for
flat tree or live tree. Both must be supported. Also the code for
live tree access should be in of_access.c rather than ofnode.c which is
really just for holding the API-conversion code.

Update ofnode_write_prop() accordingly and fix the test so it can work
with flat tree too.

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