[U-Boot] [PATCH v2 03/19] dm: device: Allow using uclass_find_device_by_seq() without OF_CONTROL

Simon Glass sjg at chromium.org
Thu Oct 11 03:13:05 UTC 2018


On 5 October 2018 at 10:45, Jean-Jacques Hiblot <jjhiblot at ti.com> wrote:
> If OF_CONTROL is not enabled and DM_SEQ_ALIAS is enabled, we must
> assign an alias (requested sequence number) to devices that belongs to a
> class with the DM_UC_FLAG_SEQ_ALIAS flag. Otherwise
> uclass_find_device_by_seq() cannot be used to get/probe a device. In
> particular i2c_get_chip_for_busnum() cannot be used.
>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
>
> ---
>
> Changes in v2:
> - don't use the DT to find the req_seq number if SPL_OF_PLATDATA is used.
>   Instead do it as if SPL_OF_CONTROL is not defined.
>
>  drivers/core/device.c        | 10 ++++++----
>  drivers/core/uclass.c        | 24 ++++++++++++++++++++++++
>  include/dm/uclass-internal.h | 13 +++++++++++++
>  3 files changed, 43 insertions(+), 4 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

Using sequence numbers without OF_CONTROL is a tricky case. This looks
OK though.


More information about the U-Boot mailing list