diff options
Diffstat (limited to 'include/dm/device.h')
-rw-r--r-- | include/dm/device.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h index 2cfe10766ff..f5738a0cee9 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -539,6 +539,21 @@ int device_find_global_by_ofnode(ofnode node, struct udevice **devp); int device_get_global_by_ofnode(ofnode node, struct udevice **devp); /** + * device_get_by_driver_info() - Get a device based on driver_info + * + * Locates a device by its struct driver_info, by using its reference which + * is updated during the bind process. + * + * The device is probed to activate it ready for use. + * + * @info: Struct driver_info + * @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(const struct driver_info *info, + struct udevice **devp); + +/** * device_find_first_child() - Find the first child of a device * * @parent: Parent device to search |