mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02: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:
@@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user