Re: [PATCH v4 08/14] core: extend struct driver_info to point to device
On Wed, 24 Jun 2020 at 22:11, Walter Lozano 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 > --- > > 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 Applied to u-boot-dm/next, thanks!
Re: [PATCH v4 08/14] core: extend struct driver_info to point to device
On Wed, 24 Jun 2020 at 22:11, Walter Lozano 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 > --- > > 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