[PATCH v3] i2c: correct I2C deblock logic

Heiko Schocher hs at denx.de
Tue Apr 11 12:59:17 CEST 2023


Hello haibo,

On 27.03.23 13:21, haibo.chen at nxp.com wrote:
> From: Haibo Chen <haibo.chen at nxp.com>
> 
> Current code use dm_gpio_get_value() to get SDA and SCL value, and the
> value depends on whether DTS file config the GPIO_ACTIVE_LOW. In ususal
> case for i2c GPIO, DTS need to set GPIO_ACTIVE_LOW for SCL/SDA pins. So
> here the logic is not correct.
> 
> And we must not use GPIOD_ACTIVE_LOW in client code include the
> dm_gpio_set_dir_flags(), it is DTS's responsibility for this flag. So
> remove GPIOD_ACTIVE_LOW here.
> 
> Fixes: aa54192d4a87 ("dm: i2c: implement gpio-based I2C deblock")
> Signed-off-by: Haibo Chen <haibo.chen at nxp.com>
> ---
>  drivers/i2c/i2c-uclass.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)


Applied to u-boot-i2c.git master

Thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
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