
On 5 October 2018 at 10:45, Jean-Jacques Hiblot jjhiblot@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@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@chromium.org
Using sequence numbers without OF_CONTROL is a tricky case. This looks OK though.