aboutsummaryrefslogtreecommitdiff
path: root/include/dm/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/dm/device.h')
-rw-r--r--include/dm/device.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index ac3b6c1b8a..5bef484247 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -554,6 +554,20 @@ int device_get_by_driver_info(const struct driver_info *info,
struct udevice **devp);
/**
+ * device_get_by_driver_info_idx() - Get a device based on driver_info index
+ *
+ * Locates a device by its struct driver_info, by using its index number which
+ * is written into the idx field of struct phandle_1_arg, etc.
+ *
+ * The device is probed to activate it ready for use.
+ *
+ * @idx: Index number of the driver_info structure (0=first)
+ * @devp: Returns pointer to device if found, otherwise this is set to NULL
+ * @return 0 if OK, -ve on error
+ */
+int device_get_by_driver_info_idx(uint idx, struct udevice **devp);
+
+/**
* device_find_first_child() - Find the first child of a device
*
* @parent: Parent device to search
@@ -823,7 +837,7 @@ static inline bool device_is_on_pci_bus(const struct udevice *dev)
_ret = device_next_child_err(&dev))
/**
- * dm_scan_fdt_dev() - Bind child device in a the device tree
+ * dm_scan_fdt_dev() - Bind child device in the device tree
*
* This handles device which have sub-nodes in the device tree. It scans all
* sub-nodes and binds drivers for each node where a driver can be found.