[U-Boot] [PATCH v2 6/7] i2c: Fill req_seq in i2c_post_bind()

Heiko Schocher hs at denx.de
Thu Feb 7 06:52:02 UTC 2019


Hello Michal,

Am 31.01.2019 um 16:31 schrieb Michal Simek:
> For i2c controllers which are missing alias in DT there is no req_seq
> setup. This function is setting up proper ID based on highest found
> alias ID.
> 
> On zcu102 this is the behavior when patch is applied.
> ZynqMP> i2c bus
> Bus 0:	i2c at ff020000
>     20: gpio at 20, offset len 1, flags 0
>     21: gpio at 21, offset len 1, flags 0
>     75: i2c-mux at 75, offset len 1, flags 0
> Bus 2:	i2c at 0
> Bus 3:	i2c at 1
> Bus 4:	i2c at 2
> Bus 1:	i2c at ff030000  (active 1)
>     74: i2c-mux at 74, offset len 1, flags 0
>     75: i2c-mux at 75, offset len 1, flags 0
> Bus 5:	i2c at 0  (active 5)
>     54: eeprom at 54, offset len 1, flags 0
> Bus 6:	i2c at 1
> Bus 7:	i2c at 2
> Bus 8:	i2c at 3
> Bus 9:	i2c at 4
> Bus 10:	i2c at 0
> Bus 11:	i2c at 1
> Bus 12:	i2c at 2
> Bus 13:	i2c at 3
> Bus 14:	i2c at 4
> Bus 15:	i2c at 5
> Bus 16:	i2c at 6
> Bus 17:	i2c at 7
> 
> Before this patch applied (controllers have -1 ID)
> ZynqMP> i2c bus
> Bus 0:	i2c at ff020000
>     20: gpio at 20, offset len 1, flags 0
>     21: gpio at 21, offset len 1, flags 0
>     75: i2c-mux at 75, offset len 1, flags 0
> Bus -1:	i2c at 0
> Bus -1:	i2c at 1
> Bus -1:	i2c at 2
> Bus 1:	i2c at ff030000  (active 1)
>     74: i2c-mux at 74, offset len 1, flags 0
>     75: i2c-mux at 75, offset len 1, flags 0
> Bus -1:	i2c at 0  (active 0)
>     54: eeprom at 54, offset len 1, flags 0
> Bus -1:	i2c at 1
> Bus -1:	i2c at 2
> Bus -1:	i2c at 3
> Bus -1:	i2c at 4
> Bus -1:	i2c at 0
> Bus -1:	i2c at 1
> Bus -1:	i2c at 2
> Bus -1:	i2c at 3
> Bus -1:	i2c at 4
> Bus -1:	i2c at 5
> Bus -1:	i2c at 6
> Bus -1:	i2c at 7
> 
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
> 
> Changes in v2:
> - Use private uclass data
> 
>   drivers/i2c/i2c-uclass.c | 28 +++++++++++++++++++++++++---
>   1 file changed, 25 insertions(+), 3 deletions(-)

Reviewed-by: Heiko Schocher <hs at denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de


More information about the U-Boot mailing list