aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dm/of_access.h16
-rw-r--r--include/dm/ofnode.h10
2 files changed, 26 insertions, 0 deletions
diff --git a/include/dm/of_access.h b/include/dm/of_access.h
index 74f0606..dd1abb8 100644
--- a/include/dm/of_access.h
+++ b/include/dm/of_access.h
@@ -219,6 +219,22 @@ struct device_node *of_find_node_by_phandle(phandle handle);
int of_read_u32(const struct device_node *np, const char *propname, u32 *outp);
/**
+ * of_read_u64() - Find and read a 64-bit integer from a property
+ *
+ * Search for a property in a device node and read a 64-bit value from
+ * it.
+ *
+ * @np: device node from which the property value is to be read.
+ * @propname: name of the property to be searched.
+ * @outp: pointer to return value, modified only if return value is 0.
+ *
+ * @return 0 on success, -EINVAL if the property does not exist,
+ * -ENODATA if property does not have a value, and -EOVERFLOW if the
+ * property data isn't large enough.
+ */
+int of_read_u64(const struct device_node *np, const char *propname, u64 *outp);
+
+/**
* of_read_u32_array() - Find and read an array of 32 bit integers
*
* Search for a property in a device node and read 32-bit value(s) from
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 5af6b7e..dbb4273 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -237,6 +237,16 @@ int ofnode_read_u32_default(ofnode ref, const char *propname, u32 def);
int ofnode_read_s32_default(ofnode node, const char *propname, s32 def);
/**
+ * ofnode_read_u64_default() - Read a 64-bit integer from a property
+ *
+ * @ref: valid node reference to read property from
+ * @propname: name of the property to read from
+ * @def: default value to return if the property has no value
+ * @return property value, or @def if not found
+ */
+int ofnode_read_u64_default(ofnode node, const char *propname, u64 def);
+
+/**
* ofnode_read_string() - Read a string from a property
*
* @ref: valid node reference to read property from