[PATCH v2 07/14] core: extend struct driver_info to point to device
Simon Glass
sjg at chromium.org
Tue Jun 23 14:28:38 CEST 2020
On Fri, 19 Jun 2020 at 08:56, 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>
More information about the U-Boot
mailing list