aboutsummaryrefslogtreecommitdiffstats
path: root/include/dm/ofnode.h
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2020-05-02 11:35:09 +0200
committerMarek Vasut <marek.vasut+renesas@gmail.com>2020-05-02 12:32:28 +0200
commit89b84b85e9c5d80e1b5eb5b52cc6596ba32135c7 (patch)
tree1c0dfd8bd3db057bf096172aeda6ee77ea22aefd /include/dm/ofnode.h
parentc693f212c5b0433b3a49a89d87cbff28bf78eb87 (diff)
downloadu-boot-89b84b85e9c5d80e1b5eb5b52cc6596ba32135c7.tar.gz
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>
Diffstat (limited to 'include/dm/ofnode.h')
-rw-r--r--include/dm/ofnode.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 618fc10390e..a0d3df77868 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -880,6 +880,14 @@ ofnode ofnode_by_prop_value(ofnode from, const char *propname,
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
*
* Translate an address from the device-tree into a CPU physical address. This