diff options
Diffstat (limited to 'include/dm/device.h')
-rw-r--r-- | include/dm/device.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/dm/device.h b/include/dm/device.h index 18296bb686..9fa0048bd0 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -386,10 +386,24 @@ int device_find_child_by_of_offset(struct udevice *parent, int of_offset, * @devp: Returns pointer to device if found, otherwise this is set to NULL * @return 0 if OK, -ve on error */ -int device_get_child_by_of_offset(struct udevice *parent, int seq, +int device_get_child_by_of_offset(struct udevice *parent, int of_offset, struct udevice **devp); /** + * device_get_global_by_of_offset() - Get a device based on FDT offset + * + * Locates a device by its device tree offset, searching globally throughout + * the all driver model devices. + * + * The device is probed to activate it ready for use. + * + * @of_offset: Device tree offset to find + * @devp: Returns pointer to device if found, otherwise this is set to NULL + * @return 0 if OK, -ve on error + */ +int device_get_global_by_of_offset(int of_offset, struct udevice **devp); + +/** * device_find_first_child() - Find the first child of a device * * @parent: Parent device to search |