i2c: omap24xx_i2c: support CONFIG for repeated start in DM_I2C xfer
authorAniket Limaye <a-limaye@ti.com>
Tue, 22 Apr 2025 10:19:51 +0000 (15:49 +0530)
committerHeiko Schocher <hs@denx.de>
Tue, 22 Apr 2025 11:03:43 +0000 (13:03 +0200)
commit5b0c6e02f83c9407103cc472e3313335c4f92dff
tree15ea69f3c3c1cbdb9929e347bcebfe57a3e78f45
parent520b57ee4763a81a165eabf700a585ae67d79aa7
i2c: omap24xx_i2c: support CONFIG for repeated start in DM_I2C xfer

Repeated Start Condition (Sr) can be used to transfer multiple i2c msgs
without sending a Stop condition (P). So far, the driver default was to
always send a Stop condition after every i2c msg.

Add support for a config option (CONFIG_SYS_I2C_OMAP24XX_REPEATED_START)
to disable sending the Stop condition by default. If this config is
enabled, Stop condition will be sent only if explicitly requested in the
msg flags OR if it is the last msg in the transfer.

Consequently, handle the Repeated Start condition (Sr) in the next msg
by not calling the wait_for_bb() check since it will simply timeout in
the absence of a stop condition (BB will be 1 until Stop is programmed)

Signed-off-by: Aniket Limaye <a-limaye@ti.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
drivers/i2c/omap24xx_i2c.c