mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
dm: core: Add function to get child count of ofnode or device
This patch add function used to get the child count of a ofnode or a device Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: Weijie Gao <weijie.gao@mediatek.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
c693f212c5
commit
89b84b85e9
4 changed files with 37 additions and 0 deletions
|
@ -879,6 +879,14 @@ ofnode ofnode_by_prop_value(ofnode from, const char *propname,
|
|||
ofnode_valid(node); \
|
||||
node = ofnode_next_subnode(node))
|
||||
|
||||
/**
|
||||
* ofnode_get_child_count() - get the child count of a ofnode
|
||||
*
|
||||
* @node: valid node to get its child count
|
||||
* @return the number of subnodes
|
||||
*/
|
||||
int ofnode_get_child_count(ofnode parent);
|
||||
|
||||
/**
|
||||
* ofnode_translate_address() - Translate a device-tree address
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue