diff options
| author | Jamie Iles <jamie@jamieiles.com> | 2011-09-14 15:49:59 -0400 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2011-10-04 18:59:53 -0400 |
| commit | 4cd7f7a31178ff8a15ad2bc1258b9b2bf2cf51a4 (patch) | |
| tree | 8cd16ff6014483e3249333816e3d6bf4a2a4cae2 /include/linux | |
| parent | 85888069cf5d0f21312e3ee730458a5e3a553509 (diff) | |
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')
| -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, | |||
| 200 | const char *propname, | 200 | const char *propname, |
| 201 | u32 *out_values, | 201 | u32 *out_values, |
| 202 | size_t sz); | 202 | size_t sz); |
| 203 | extern int of_property_read_u64(const struct device_node *np, | ||
| 204 | const char *propname, u64 *out_value); | ||
| 203 | 205 | ||
| 204 | extern int of_property_read_string(struct device_node *np, | 206 | extern int of_property_read_string(struct device_node *np, |
| 205 | const char *propname, | 207 | const char *propname, |
| @@ -281,6 +283,12 @@ static inline const void *of_get_property(const struct device_node *node, | |||
| 281 | return NULL; | 283 | return NULL; |
| 282 | } | 284 | } |
| 283 | 285 | ||
| 286 | static inline int of_property_read_u64(const struct device_node *np, | ||
| 287 | const char *propname, u64 *out_value) | ||
| 288 | { | ||
| 289 | return -ENOSYS; | ||
| 290 | } | ||
| 291 | |||
| 284 | #define of_match_ptr(_ptr) NULL | 292 | #define of_match_ptr(_ptr) NULL |
| 285 | #endif /* CONFIG_OF */ | 293 | #endif /* CONFIG_OF */ |
| 286 | 294 | ||
