dm: core: Add a function to count the children of a device
Add a function to count the available children of a device.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
diff --git a/include/dm/device.h b/include/dm/device.h
index d121042..defda0a 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -405,6 +405,15 @@
int device_get_child(struct udevice *parent, int index, struct udevice **devp);
/**
+ * device_get_child_count() - Get the available child count of a device
+ *
+ * Returns the number of children to a device.
+ *
+ * @parent: Parent device to check
+ */
+int device_get_child_count(struct udevice *parent);
+
+/**
* device_find_child_by_seq() - Find a child device based on a sequence
*
* This searches for a device with the given seq or req_seq.