summaryrefslogtreecommitdiff
path: root/include/dm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-19 02:09:05 (GMT)
committerSimon Glass <sjg@chromium.org>2017-06-01 13:03:08 (GMT)
commit396e343b3d03e3773edf4a39f49c7918d4b8ff91 (patch)
treeac38ebc93c2b49338cc7161f5e9ffbe2a461e9a8 /include/dm
parent47a0fd3bad3858ae2f58bc3b3368e16ed20f394c (diff)
downloadu-boot-396e343b3d03e3773edf4a39f49c7918d4b8ff91.tar.xz
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>
Diffstat (limited to 'include/dm')
-rw-r--r--include/dm/device-internal.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index 2cabc87..81ab893 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 <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
*