diff options
| author | Simon Glass <[email protected]> | 2018-06-11 13:07:10 -0600 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2018-07-09 09:11:00 -0600 |
| commit | 7e5196c409f17091f2aeca144c6d76750df81cc4 (patch) | |
| tree | 427b03797b692f0752fecd92dccc397027df98da /include/dm/ofnode.h | |
| parent | 90c08fa038451d6d7b7d8711bfd829b61d64c490 (diff) | |
dm: core: Add ofnode function to read a 64-bit int
We have a 32-bit version of this function. Add a 64-bit version as well so
we can easily read 64-bit ints from the device tree.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include/dm/ofnode.h')
| -rw-r--r-- | include/dm/ofnode.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index 5af6b7e616a..dbb4273db64 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -237,6 +237,16 @@ int ofnode_read_u32_default(ofnode ref, const char *propname, u32 def); int ofnode_read_s32_default(ofnode node, const char *propname, s32 def); /** + * ofnode_read_u64_default() - Read a 64-bit integer from a property + * + * @ref: valid node reference to read property from + * @propname: name of the property to read from + * @def: default value to return if the property has no value + * @return property value, or @def if not found + */ +int ofnode_read_u64_default(ofnode node, const char *propname, u64 def); + +/** * ofnode_read_string() - Read a string from a property * * @ref: valid node reference to read property from |
