1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-11-01 19:05:51 +01:00

treewide: fdt: Move fdt_get_config_... to ofnode_conf_read...

The current API is outdated as it requires a devicetree pointer.

Move these functions to use the ofnode API and update this globally. Add
some tests while we are here.

Correct the call in exynos_dsim_config_parse_dt() which is obviously
wrong.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2021-08-07 07:24:01 -06:00
parent bb38d77ca7
commit 7de8bd03c3
20 changed files with 124 additions and 116 deletions

View File

@@ -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