u-boot/drivers/core
Patrick Delaunay ce891fcada dm: core: add ofnode and dev function to iterate on node property
Add functions to iterate on all property with livetree
- dev_read_first_prop
- dev_read_next_prop
- dev_read_prop_by_prop
and
- ofnode_get_first_property
- ofnode_get_next_property
- ofnode_get_property_by_prop

And helper: dev_for_each_property

For example:
struct ofprop property;

dev_for_each_property(property, config) {
	value = dev_read_prop_by_prop(&property, &propname, &len);

or:

for (res = ofnode_get_first_property(node, &property);
     !res;
     res = ofnode_get_next_property(&property))
{
     value = ofnode_get_property_by_prop(&property, &propname, &len);
....
}

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-04-16 23:06:54 -04:00
..
acpi.c dm: core: Add basic ACPI support 2020-04-16 14:36:28 +08:00
device-remove.c dm: core: Add a way to skip powering down power domains 2020-04-16 08:07:58 -06:00
device.c dm: core: Read parent ofdata before children 2020-04-16 08:07:58 -06:00
devres.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
dump.c dm: dump.c: Refactor dm_dump_drivers prints 2020-04-09 15:12:34 -06:00
fdtaddr.c dm: core: Use const device for the devfdt...() interface 2020-02-05 19:33:45 -07:00
Kconfig dm: core: Add basic ACPI support 2020-04-16 14:36:28 +08:00
lists.c dm: core: remove the duplicated function dm_ofnode_pre_reloc 2020-04-16 08:07:58 -06:00
Makefile dm: core: Add basic ACPI support 2020-04-16 14:36:28 +08:00
of_access.c dm: core: add ofnode and dev function to iterate on node property 2020-04-16 23:06:54 -04:00
of_addr.c dm: core: Introduce xxx_translate_dma_address() 2019-07-22 09:21:28 +02:00
of_extra.c dm: core: Update ofnode to read binman-style flash entry 2018-10-09 04:40:27 -06:00
ofnode.c dm: core: add ofnode and dev function to iterate on node property 2020-04-16 23:06:54 -04:00
read.c dm: core: add ofnode and dev function to iterate on node property 2020-04-16 23:06:54 -04:00
read_extra.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
regmap.c regmap: Fix potential memory leaks 2019-12-03 08:44:14 -05:00
root.c dm: core: Move "/chosen" and "/firmware" node scan 2020-04-16 08:07:57 -06:00
simple-bus.c simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver 2019-04-23 20:26:43 -06:00
syscon-uclass.c sandbox conversion to SDL2 2020-02-11 10:58:41 -05:00
uclass.c dm: core: Add a way to skip powering down power domains 2020-04-16 08:07:58 -06:00
util.c dm: core: remove the duplicated function dm_ofnode_pre_reloc 2020-04-16 08:07:58 -06:00