[PATCH v4 08/14] core: extend struct driver_info to point to device
Simon Glass
sjg at chromium.org
Mon Jul 6 03:31:06 CEST 2020
On Wed, 24 Jun 2020 at 22:11, Walter Lozano <walter.lozano at collabora.com> wrote:
>
> Currently when creating an U_BOOT_DEVICE entry a struct driver_info
> is declared, which contains the data needed to instantiate the device.
> However, the actual device is created at runtime and there is no proper
> way to get the device based on its struct driver_info.
>
> This patch extends struct driver_info adding a pointer to udevice which
> is populated during the bind process, allowing to generate a set of
> functions to get the device based on its struct driver_info.
>
> Signed-off-by: Walter Lozano <walter.lozano at collabora.com>
> ---
>
> drivers/core/device.c | 26 +++++++++++++++++++++++---
> drivers/core/root.c | 4 ++++
> include/dm/device.h | 15 +++++++++++++++
> include/dm/platdata.h | 14 ++++++++++++++
> 4 files changed, 56 insertions(+), 3 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
Applied to u-boot-dm/next, thanks!
More information about the U-Boot
mailing list