diff options
author | Jamie Iles <jamie@jamieiles.com> | 2011-09-14 21:49:59 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-10-05 00:59:53 +0200 |
commit | 4cd7f7a31178ff8a15ad2bc1258b9b2bf2cf51a4 (patch) | |
tree | 8cd16ff6014483e3249333816e3d6bf4a2a4cae2 /include | |
parent | tty: use of_match_ptr() for of_match_table entry (diff) | |
download | linux-4cd7f7a31178ff8a15ad2bc1258b9b2bf2cf51a4.tar.xz linux-4cd7f7a31178ff8a15ad2bc1258b9b2bf2cf51a4.zip |
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')
-rw-r--r-- | include/linux/of.h | 8 |
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 */ |