Hi Rasmus,

On Thu, 13 Apr 2023 at 09:17, Rasmus Villemoes
<rasmus.villem...@prevas.dk> wrote:
>
> There's quite a few instances of board-specific code doing
>
>   off = fdt_path_offset(gd->fdt_blob, ...);
>   ...
>   ret = uclass_get_device_by_of_offset(..., off, &dev);
>
> looking for an eeprom or a pmic via some alias. Such code can be
> simplified a little if we have a helper for directly getting a device
> via device tree path (including being given as an alias).
>
> Implement it in terms of ofnode rather than raw offsets so that this
> will work whether live tree is enabled or not.
>
> Signed-off-by: Rasmus Villemoes <rasmus.villem...@prevas.dk>
> ---
>  drivers/core/uclass.c |  6 ++++++
>  include/dm/uclass.h   | 17 +++++++++++++++++
>  2 files changed, 23 insertions(+)

Looks fine but please add a test to ofnode.c

Regards,
Simon

Applied to u-boot-dm, thanks!

Reply via email to