summaryrefslogtreecommitdiff
path: root/include/dm/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/dm/device.h')
-rw-r--r--include/dm/device.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 847934425b..27a6d7b9fd 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -525,6 +525,8 @@ int device_find_next_child(struct udevice **devp);
* This is used to locate an existing child of a device which is of a given
* uclass.
*
+ * The device is NOT probed
+ *
* @parent: Parent device to search
* @uclass_id: Uclass to look for
* @devp: Returns device found, if any
@@ -535,6 +537,29 @@ int device_find_first_inactive_child(struct udevice *parent,
struct udevice **devp);
/**
+ * device_find_first_child_by_uclass() - Find the first child of a device in uc
+ *
+ * @parent: Parent device to search
+ * @uclass_id: Uclass to look for
+ * @devp: Returns first child device in that uclass, if any
+ * @return 0 if found, else -ENODEV
+ */
+int device_find_first_child_by_uclass(struct udevice *parent,
+ enum uclass_id uclass_id,
+ struct udevice **devp);
+
+/**
+ * device_find_child_by_name() - Find a child by device name
+ *
+ * @parent: Parent device to search
+ * @name: Name to look for
+ * @devp: Returns device found, if any
+ * @return 0 if found, else -ENODEV
+ */
+int device_find_child_by_name(struct udevice *parent, const char *name,
+ struct udevice **devp);
+
+/**
* device_has_children() - check if a device has any children
*
* @dev: Device to check