X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fdm%2Fdevice-internal.h;h=0bf8707493a9d3f6c3d0ce368e5a7b075c64edd9;hb=11e44fc6bda2248271d26a8488f5efe189b55a30;hp=b348ad5231bd1fef019e52bbbf27d8c7247d9ebd;hpb=161b1fe745394f34c4aa506edc964089785919f6;p=u-boot diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h index b348ad5231..0bf8707493 100644 --- a/include/dm/device-internal.h +++ b/include/dm/device-internal.h @@ -38,6 +38,30 @@ int device_bind(struct udevice *parent, const struct driver *drv, const char *name, void *platdata, int of_offset, struct udevice **devp); +/** + * device_bind_with_driver_data() - Create a device and bind it to a driver + * + * Called to set up a new device attached to a driver, in the case where the + * driver was matched to the device by means of a match table that provides + * driver_data. + * + * Once bound a device exists but is not yet active until device_probe() is + * called. + * + * @parent: Pointer to device's parent, under which this driver will exist + * @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. + * @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, + struct udevice **devp); + /** * device_bind_by_name: Create a device and bind it to a driver *