summaryrefslogtreecommitdiff
path: root/include/dm/device.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-12-16 20:59:32 -0700
committerTom Rini <trini@konsulko.com>2021-12-23 10:24:40 -0500
commit6476c4d9818beac88610f18ff3c3cb05c7a1f33b (patch)
tree90bbf1c2bbaa910806e695a472bc52000056721d /include/dm/device.h
parent985503439762c3168aeb80f529bb9bbcd773dd2c (diff)
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>
Diffstat (limited to 'include/dm/device.h')
-rw-r--r--include/dm/device.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 544734ecb31..cf785f7ae21 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -593,7 +593,7 @@ int device_get_child(const struct udevice *parent, int index,
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(const struct udevice *parent, int index,
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.