[PATCH 0/3] i2c: qcom-geni: Add I2C bus recovery support
From: Aniket Randive
Date: Wed Aug 26 2026 - 06:15:39 EST
An I2C target that gets interrupted during a transaction can hold SDA low,
leaving the bus stuck and preventing further transfers.
This series adds bus recovery support to the Qualcomm GENI I2C driver using
the hardware native I2C_BUS_CLEAR and I2C_STOP_ON_BUS M_CMD opcodes. These
commands generate up to nine SCL pulses, which is the standard I2C bus
recovery sequence, and then issue a STOP condition to release the bus
without requiring GPIO based recovery.
Recovery is triggered automatically from geni_i2c_xfer() when a transfer
fails and the SE_GENI_IOS register indicates that SDA remains low. The
recovery callback is also registered through i2c_bus_recovery_info, allowing
recovery to be initiated through the I2C core i2c_recover_bus() API.
The patches are organized as follows:
[1/3] dmaengine: qcom: gpi: Add I2C_BUS_CLEAR and I2C_STOP_ON_BUS opcodes
[2/3] i2c: qcom-geni: Add bus recovery support for FIFO mode
[3/3] i2c: qcom-geni: Add bus recovery support for GPI DMA mode
Signed-off-by: Aniket Randive <aniket.randive@xxxxxxxxxxxxxxxx>
---
Aniket Randive (3):
dmaengine: qcom: gpi: Add I2C bus recovery opcode support
i2c: qcom-geni: Add bus recovery support for FIFO mode
i2c: qcom-geni: Add bus recovery support for GPI DMA mode
drivers/dma/qcom/gpi.c | 30 ++++++
drivers/i2c/busses/i2c-qcom-geni.c | 185 ++++++++++++++++++++++++++++++++++++-
include/linux/dma/qcom-gpi-dma.h | 2 +
3 files changed, 215 insertions(+), 2 deletions(-)
---
base-commit: a8406e6c0b793ce0788019683837c40855b55995
change-id: 20260706-i2c_bus_recovery-8f0c20283d99
Best regards,
--
Aniket Randive <aniket.randive@xxxxxxxxxxxxxxxx>