dm: core: Add support for writing u32 with ofnode

Add a new function to write an integer to an ofnode (live tree or
flat tree).

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2022-07-30 15:52:14 -06:00
committed by Tom Rini
parent 39e42be12b
commit 55f7990bfe
3 changed files with 41 additions and 0 deletions

View File

@@ -1154,6 +1154,16 @@ int ofnode_write_prop(ofnode node, const char *propname, const void *value,
*/
int ofnode_write_string(ofnode node, const char *propname, const char *value);
/**
* ofnode_write_u32() - Set an integer property of an ofnode
*
* @node: The node for whose string property should be set
* @propname: The name of the string property to set
* @value: The new value of the 32-bit integer property
* Return: 0 if successful, -ve on error
*/
int ofnode_write_u32(ofnode node, const char *propname, u32 value);
/**
* ofnode_set_enabled() - Enable or disable a device tree node given by its
* ofnode