dt: add helper to read 64-bit integers
Add a helper similar to of_property_read_u32() that handles 64-bit
integers.
v2/v3: constify device node and property name parameters.
Cc: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
diff --git a/include/linux/of.h b/include/linux/of.h
index 53107b0..1cc9930 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -200,6 +200,8 @@
const char *propname,
u32 *out_values,
size_t sz);
+extern int of_property_read_u64(const struct device_node *np,
+ const char *propname, u64 *out_value);
extern int of_property_read_string(struct device_node *np,
const char *propname,
@@ -281,6 +283,12 @@
return NULL;
}
+static inline int of_property_read_u64(const struct device_node *np,
+ const char *propname, u64 *out_value)
+{
+ return -ENOSYS;
+}
+
#define of_match_ptr(_ptr) NULL
#endif /* CONFIG_OF */