Skip to content
Commit ca031c08 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Simon Glass
Browse files

dm: core: introduce uclass_get_device_by_of_path()



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: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
parent 6ebb357a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment