android_kernel_motorola_sm6375/drivers/i2c
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Leilk.Liu 7dc48c447a i2c: mediatek: fix potential incorrect use of I2C_MASTER_WRRD
[ Upstream commit b492183652808e0f389272bf63dc836241b287ff ]

The old IC does not support the I2C_MASTER_WRRD (write-then-read)
function, but the current code’s handling of i2c->auto_restart may
potentially lead to entering the I2C_MASTER_WRRD software flow,
resulting in unexpected bugs.

Instead of repurposing the auto_restart flag, add a separate flag
to signal I2C_MASTER_WRRD operations.

Also fix handling of msgs. If the operation (i2c->op) is
I2C_MASTER_WRRD, then the msgs pointer is incremented by 2.
For all other operations, msgs is simply incremented by 1.

Fixes: b2ed11e224 ("I2C: mediatek: Add driver for MediaTek MT8173 I2C controller")
Signed-off-by: Leilk.Liu <leilk.liu@mediatek.com>
Suggested-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-29 13:59:46 +01:00
..
algos
busses i2c: mediatek: fix potential incorrect use of I2C_MASTER_WRRD 2025-10-29 13:59:46 +01:00
muxes i2c: mux: demux-pinctrl: check initial mux selection, too 2025-02-01 18:18:50 +01:00
i2c-boardinfo.c
i2c-core-acpi.c
i2c-core-base.c i2c: smbus: fix NULL function pointer dereference 2024-05-02 16:18:37 +02:00
i2c-core-of.c
i2c-core-slave.c
i2c-core-smbus.c
i2c-core.h
i2c-dev.c
i2c-mux.c
i2c-slave-eeprom.c
i2c-smbus.c i2c: smbus: Send alert notifications to all devices if source not found 2024-08-19 05:33:50 +02:00
i2c-stub.c
Kconfig
Makefile