mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
dm: core: Support copying properties with ofnode
Add a function to copy properties from one node to another. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
0b58eaa89c
commit
db1ef1e12b
3 changed files with 99 additions and 0 deletions
|
@ -1505,4 +1505,20 @@ static inline const char *ofnode_conf_read_str(const char *prop_name)
|
|||
*/
|
||||
int ofnode_add_subnode(ofnode parent, const char *name, ofnode *nodep);
|
||||
|
||||
/**
|
||||
* ofnode_copy_props() - copy all properties from one node to another
|
||||
*
|
||||
* Makes a copy of all properties from the source note in the destination node.
|
||||
* Existing properties in the destination node remain unchanged, except that
|
||||
* any with the same name are overwritten, including changing the size of the
|
||||
* property.
|
||||
*
|
||||
* For livetree, properties are copied / allocated, so the source tree does not
|
||||
* need to be present afterwards.
|
||||
*
|
||||
* @src: Source node to read properties from
|
||||
* @dst: Destination node to write properties too
|
||||
*/
|
||||
int ofnode_copy_props(ofnode src, ofnode dst);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue