]> git.baikalelectronics.ru Git - uboot.git/commit
dm: device: Allow using uclass_find_device_by_seq() without OF_CONTROL
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Fri, 7 Dec 2018 13:50:39 +0000 (14:50 +0100)
committerHeiko Schocher <hs@denx.de>
Mon, 10 Dec 2018 05:05:32 +0000 (06:05 +0100)
commite6e700b3afe2944453f6b09c882d39a7dcbb2642
treec367a4fefd555225d5be719f2cd12e564b4592ad
parent5bf80e4363bf3c1fac3bd7adc444163fa7b43fbe
dm: device: Allow using uclass_find_device_by_seq() without OF_CONTROL

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>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
drivers/core/device.c
drivers/core/uclass.c
include/dm/uclass-internal.h