Skip to content
Commit 7f6a2e6e authored by Haibo Chen's avatar Haibo Chen Committed by Heiko Schocher
Browse files

i2c: correct I2C deblock logic



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: aa54192d ("dm: i2c: implement gpio-based I2C deblock")
Signed-off-by: default avatarHaibo Chen <haibo.chen@nxp.com>
Reviewed-by: default avatarAlexander Kochetkov &lt;al.kochet@gmail.com <mailto:al.kochet@gmail.com&gt;>
parent d600b0fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment