From 396e343b3d03e3773edf4a39f49c7918d4b8ff91 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 18 May 2017 20:09:05 -0600 Subject: 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 --- include/dm/device-internal.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h index 2cabc87338f..81ab893b600 100644 --- a/include/dm/device-internal.h +++ b/include/dm/device-internal.h @@ -11,6 +11,9 @@ #ifndef _DM_DEVICE_INTERNAL_H #define _DM_DEVICE_INTERNAL_H +#include + +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 * -- cgit v1.2.3