]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
i2c: rcar: enhance comment to avoid regressions
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 28 Apr 2018 20:01:02 +0000 (22:01 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 30 Apr 2018 09:14:35 +0000 (11:14 +0200)
Give a clear testcase for people wishing to change this code. It is also
a reminder for me if people ask about it.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-rcar.c

index c6915b835396587d7d39682ef7743e85a191ee6b..9d8d5b91220fdf2fddb18f74a171d47fb6fa65d1 100644 (file)
@@ -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);