summaryrefslogtreecommitdiff
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorJamie Iles <jamie@jamieiles.com>2011-09-14 23:49:59 +0400
committerGrant Likely <grant.likely@secretlab.ca>2011-10-05 02:59:53 +0400
commit4cd7f7a31178ff8a15ad2bc1258b9b2bf2cf51a4 (patch)
tree8cd16ff6014483e3249333816e3d6bf4a2a4cae2 /include/linux/of.h
parent85888069cf5d0f21312e3ee730458a5e3a553509 (diff)
downloadlinux-4cd7f7a31178ff8a15ad2bc1258b9b2bf2cf51a4.tar.xz
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>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 53107b09cbdf..1cc9930ba06a 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -200,6 +200,8 @@ extern int of_property_read_u32_array(const struct device_node *np,
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 @@ static inline const void *of_get_property(const struct device_node *node,
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 */