diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2020-05-02 12:35:09 +0300 |
---|---|---|
committer | Marek Vasut <marek.vasut+renesas@gmail.com> | 2020-05-02 13:32:28 +0300 |
commit | 89b84b85e9c5d80e1b5eb5b52cc6596ba32135c7 (patch) | |
tree | 1c0dfd8bd3db057bf096172aeda6ee77ea22aefd /drivers/core/read.c | |
parent | c693f212c5b0433b3a49a89d87cbff28bf78eb87 (diff) | |
download | u-boot-89b84b85e9c5d80e1b5eb5b52cc6596ba32135c7.tar.xz |
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 'drivers/core/read.c')
-rw-r--r-- | drivers/core/read.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/core/read.c b/drivers/core/read.c index 47b8e03446..3d421f7a69 100644 --- a/drivers/core/read.c +++ b/drivers/core/read.c @@ -352,3 +352,8 @@ fdt_addr_t dev_read_addr_pci(const struct udevice *dev) return addr; } + +int dev_get_child_count(const struct udevice *dev) +{ + return ofnode_get_child_count(dev_ofnode(dev)); +} |