dm: core: Allow getting some basic stats
Add a function that returns some basic stats about driver model. For now
we only have two.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/include/dm/device.h b/include/dm/device.h
index 544734e..cf785f7 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -593,7 +593,7 @@
struct udevice **devp);
/**
- * device_get_child_count() - Get the available child count of a device
+ * device_get_child_count() - Get the child count of a device
*
* Returns the number of children to a device.
*
@@ -602,6 +602,15 @@
int device_get_child_count(const struct udevice *parent);
/**
+ * device_get_decendent_count() - Get the total number of decendents of a device
+ *
+ * Returns the total number of decendents, including all children
+ *
+ * @parent: Parent device to check
+ */
+int device_get_decendent_count(const 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.