diff options
| author | Tom Rini <[email protected]> | 2021-09-27 11:09:23 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2021-09-27 11:09:23 -0400 |
| commit | 1d1f98c8eed7bb4792300e655c2cb70136928f74 (patch) | |
| tree | d08df140d52bd1298fa0e81ce908e2e09a880e5d /include/dm/ofnode.h | |
| parent | e908d20fcbd847e17345591fc171b59d9a156516 (diff) | |
| parent | 933bf2644591281ed96f9d5771cbb35fe95bcb00 (diff) | |
Merge tag 'dm-pull-next-27sep21' of https://source.denx.de/u-boot/custodians/u-boot-dm into next
Various of-platdata improvements, including CONFIG_OF_REAL
Diffstat (limited to 'include/dm/ofnode.h')
| -rw-r--r-- | include/dm/ofnode.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index 4e1a8447e65..6a714d0c7b5 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -1117,4 +1117,41 @@ int ofnode_write_string(ofnode node, const char *propname, const char *value); */ int ofnode_set_enabled(ofnode node, bool value); +/** + * ofnode_conf_read_bool() - Read a boolean value from the U-Boot config + * + * This reads a property from the /config node of the devicetree. + * + * See doc/config.txt for bindings + * + * @prop_name property name to look up + * @return true, if it exists, false if not + */ +bool ofnode_conf_read_bool(const char *prop_name); + +/** + * ofnode_conf_read_int() - Read an integer value from the U-Boot config + * + * This reads a property from the /config node of the devicetree. + * + * See doc/config.txt for bindings + * + * @prop_name: property name to look up + * @default_val: default value to return if the property is not found + * @return integer value, if found, or @default_val if not + */ +int ofnode_conf_read_int(const char *prop_name, int default_val); + +/** + * ofnode_conf_read_str() - Read a string value from the U-Boot config + * + * This reads a property from the /config node of the devicetree. + * + * See doc/config.txt for bindings + * + * @prop_name: property name to look up + * @return string value, if found, or NULL if not + */ +const char *ofnode_conf_read_str(const char *prop_name); + #endif |
