DMA Engine development
 help / color / mirror / Atom feed
* [PATCH 0/3] i2c: qcom-geni: Add I2C bus recovery support
@ 2026-08-26  9:51 Aniket Randive
  2026-08-26  9:51 ` [PATCH v1 1/3] dmaengine: qcom: gpi: Add I2C bus recovery opcode support Aniket Randive
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Aniket Randive @ 2026-08-26  9:51 UTC (permalink / raw)
  To: Vinod Koul, Frank Li, Mukesh Kumar Savaliya, Viken Dadhaniya,
	Andi Shyti
  Cc: linux-arm-msm, dmaengine, linux-kernel, linux-i2c, Aniket Randive

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@oss.qualcomm.com>
---
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@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-09-03 16:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-26  9:51 [PATCH 0/3] i2c: qcom-geni: Add I2C bus recovery support Aniket Randive
2026-08-26  9:51 ` [PATCH v1 1/3] dmaengine: qcom: gpi: Add I2C bus recovery opcode support Aniket Randive
2026-08-26  9:51 ` [PATCH v1 2/3] i2c: qcom-geni: Add bus recovery support for FIFO mode Aniket Randive
2026-08-26 10:03   ` sashiko-bot
2026-09-03 16:17   ` Jyothi Kumar Seerapu
2026-08-26  9:51 ` [PATCH v1 3/3] i2c: qcom-geni: Add bus recovery support for GPI DMA mode Aniket Randive
2026-08-26 10:05   ` sashiko-bot
2026-09-03 16:14   ` Jyothi Kumar Seerapu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox