mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
dm: core: Allow binding a device from a live tree
When a live tree is being used we need to record the node that was used to create the device. Update device_bind_with_driver_data() to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
47a0fd3bad
commit
396e343b3d
3 changed files with 15 additions and 15 deletions
|
@ -11,6 +11,9 @@
|
|||
#ifndef _DM_DEVICE_INTERNAL_H
|
||||
#define _DM_DEVICE_INTERNAL_H
|
||||
|
||||
#include <dm/ofnode.h>
|
||||
|
||||
struct device_node;
|
||||
struct udevice;
|
||||
|
||||
/**
|
||||
|
@ -52,16 +55,15 @@ int device_bind(struct udevice *parent, const struct driver *drv,
|
|||
* @drv: Device's driver
|
||||
* @name: Name of device (e.g. device tree node name)
|
||||
* @driver_data: The driver_data field from the driver's match table.
|
||||
* @of_offset: Offset of device tree node for this device. This is -1 for
|
||||
* devices which don't use device tree.
|
||||
* @node: Device tree node for this device. This is invalid for devices which
|
||||
* don't use device tree.
|
||||
* @devp: if non-NULL, returns a pointer to the bound device
|
||||
* @return 0 if OK, -ve on error
|
||||
*/
|
||||
int device_bind_with_driver_data(struct udevice *parent,
|
||||
const struct driver *drv, const char *name,
|
||||
ulong driver_data, int of_offset,
|
||||
ulong driver_data, ofnode node,
|
||||
struct udevice **devp);
|
||||
|
||||
/**
|
||||
* device_bind_by_name: Create a device and bind it to a driver
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue