]> git.baikalelectronics.ru Git - uboot.git/commit
core: extend struct driver_info to point to device
authorWalter Lozano <walter.lozano@collabora.com>
Thu, 25 Jun 2020 04:10:11 +0000 (01:10 -0300)
committerSimon Glass <sjg@chromium.org>
Fri, 10 Jul 2020 04:00:29 +0000 (22:00 -0600)
commit69c205aee8e6ed46ebb02b0a63a51b28b3c6f654
tree4092eed255409590eac22d1e633f6fa616a1fc05
parentb286daef2059e7870150c46f112dbc90ace394f7
core: extend struct driver_info to point to device

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@collabora.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/core/device.c
drivers/core/root.c
include/dm/device.h
include/dm/platdata.h