aboutsummaryrefslogtreecommitdiff
path: root/include/dm/ofnode.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-04-16 13:45:03 -0400
committerTom Rini <trini@konsulko.com>2020-04-16 13:45:03 -0400
commitf51b4bcf61c9aa7994138a4a417488c1fbdb47cd (patch)
tree4f536d0892be1359f2cf02bfe366b56bef83bf28 /include/dm/ofnode.h
parentdba0a6ae1907bbff3ebda06e4874d006f10db1bb (diff)
parentb0dcc87106464c3fc019e3771378a092fd32ebdb (diff)
Merge tag 'dm-pull-10apr20-take2' of git://git.denx.de/u-boot-dm
Functions for reading indexed values from device tree Enhancements to 'dm' command Log test enhancements and syslog driver DM change to read parent ofdata before children Minor fixes
Diffstat (limited to 'include/dm/ofnode.h')
-rw-r--r--include/dm/ofnode.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index b5a50e8849..ce5e366c06 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -203,6 +203,18 @@ static inline ofnode ofnode_null(void)
int ofnode_read_u32(ofnode node, const char *propname, u32 *outp);
/**
+ * ofnode_read_u32_index() - Read a 32-bit integer from a multi-value property
+ *
+ * @ref: valid node reference to read property from
+ * @propname: name of the property to read from
+ * @index: index of the integer to return
+ * @outp: place to put value (if found)
+ * @return 0 if OK, -ve on error
+ */
+int ofnode_read_u32_index(ofnode node, const char *propname, int index,
+ u32 *outp);
+
+/**
* ofnode_read_s32() - Read a 32-bit integer from a property
*
* @ref: valid node reference to read property from
@@ -227,6 +239,19 @@ static inline int ofnode_read_s32(ofnode node, const char *propname,
u32 ofnode_read_u32_default(ofnode ref, const char *propname, u32 def);
/**
+ * ofnode_read_u32_index_default() - Read a 32-bit integer from a multi-value
+ * property
+ *
+ * @ref: valid node reference to read property from
+ * @propname: name of the property to read from
+ * @index: index of the integer to return
+ * @def: default value to return if the property has no value
+ * @return property value, or @def if not found
+ */
+u32 ofnode_read_u32_index_default(ofnode ref, const char *propname, int index,
+ u32 def);
+
+/**
* ofnode_read_s32_default() - Read a 32-bit integer from a property
*
* @ref: valid node reference to read property from