Skip to contentSkip to conversation

i2c: rcar: enhance comment to avoid regressions

PATCH Applied Wolfram Sang 1 participant 2 messages Apr 28, 2018 – Apr 30, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: rcar: enhance comment to avoid regressions

From: Wolfram Sang <[email protected]>

Give a clear testcase for people wishing to change this code. It is also a reminder for me if people ask about it.

---
 drivers/i2c/busses/i2c-rcar.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/i2c/busses/i2c-rcar.c +2 -0
index c6915b835396..9d8d5b91220f 100644
@@ -542,6 +542,8 @@ static void rcar_i2c_irq_recv(struct rcar_i2c_priv *priv, u32 msr)
 	 * If next received data is the _LAST_, go to STOP phase. Might be
 	 * overwritten by REP START when setting up a new msg. Not elegant
 	 * but the only stable sequence for REP START I have found so far.
+	 * If you want to change this code, make sure sending one transfer with
+	 * four messages (WR-RD-WR-RD) works!
 	 */
 	if (priv->pos + 1 >= msg->len)
 		rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_STOP);
Signature · 1 line
2.11.0