diff options
author | Simon Glass <sjg@chromium.org> | 2014-11-11 10:46:21 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-11-22 10:16:47 +0100 |
commit | e33dc221f45ca501319f5aebd1c88574238261be (patch) | |
tree | 1be16d0d508c305b89757063d0c2e939ea226714 /include/dm/lists.h | |
parent | a88340dfcf8a34cf7fe000c619d01e1d0f0a442a (diff) |
dm: Add a function to bind a device by driver name
In some cases we need to manually bind a device to a particular driver.
Add a function to do this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Acked-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'include/dm/lists.h')
-rw-r--r-- | include/dm/lists.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/dm/lists.h b/include/dm/lists.h index 704e33e37f..1b50af9f23 100644 --- a/include/dm/lists.h +++ b/include/dm/lists.h @@ -60,4 +60,17 @@ int lists_bind_drivers(struct udevice *parent, bool pre_reloc_only); int lists_bind_fdt(struct udevice *parent, const void *blob, int offset, struct udevice **devp); +/** + * device_bind_driver() - bind a device to a driver + * + * This binds a new device to a driver. + * + * @parent: Parent device + * @drv_name: Name of driver to attach to this parent + * @dev_name: Name of the new device thus created + * @devp: Returns the newly bound device + */ +int device_bind_driver(struct udevice *parent, const char *drv_name, + const char *dev_name, struct udevice **devp); + #endif |