[PATCH v2 0/3] i2c: qcom-geni: Add I2C bus recovery support
From: Aniket Randive
Date: Fri Oct 23 2026 - 08:02:44 EST
An interrupted I2C transaction can leave a target holding SDA low and
prevent subsequent transfers. Add recovery using the GENI I2C_BUS_CLEAR
and I2C_STOP_ON_BUS opcodes in both FIFO and GPI DMA modes.
The series adds zero-payload recovery opcode support to the GPI DMA
driver, registers an I2C bus recovery callback, and triggers recovery
following relevant transfer errors when the bus is not free. Recovery
checks both SDA and SCL and preserves the original transfer error.
---
Changes in v2:
- Rebase onto next-20261006.
- Move the recovery opcode macro removal into the DMA opcode patch.
- Check both SDA and SCL for bus idle and reject recovery with SCL low.
- Share the bus-state and recovery-trigger checks between both modes.
- Guard the current message pointer when checking data NACK status.
- Reuse the FIFO transfer abort helper for recovery command timeouts.
- Use the adapter timeout for FIFO and GPI recovery commands.
- Preserve the DMA configuration error code in GPI recovery.
- Link to v1: https://lore.kernel.org/r/20260826-i2c_bus_recovery-v1-0-203f0ec76f84@xxxxxxxxxxxxxxxx
To: Vinod Koul <vkoul@xxxxxxxxxx>
To: Frank Li <Frank.Li@xxxxxxxxxx>
To: Mukesh Kumar Savaliya <mukesh.savaliya@xxxxxxxxxxxxxxxx>
To: Viken Dadhaniya <viken.dadhaniya@xxxxxxxxxxxxxxxx>
To: Andi Shyti <andi.shyti@xxxxxxxxxx>
Cc: naresh.maramaina@xxxxxxxxxxxxxxxx
Cc: linux-arm-msm@xxxxxxxxxxxxxxx
Cc: dmaengine@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-i2c@xxxxxxxxxxxxxxx
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 | 197 ++++++++++++++++++++++++++++++++++++-
include/linux/dma/qcom-gpi-dma.h | 2 +
3 files changed, 226 insertions(+), 3 deletions(-)
---
base-commit: eea3fef32a9cf36abcb5975a5a594e4135a6b026
change-id: 20261008-20260826_aniket_randive_oss_qualcomm_com-84f5f536302d
Best regards,
--
Aniket Randive <aniket.randive@xxxxxxxxxxxxxxxx>