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>
This commit is contained in:
@ -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 */
|
||||
|
||||
|
Reference in New Issue
Block a user