i2c: rcar: don't issue stop when HW does it automatically
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 3 Sep 2015 20:20:10 +0000 (22:20 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 9 Oct 2015 21:31:13 +0000 (22:31 +0100)
The manual says (55.4.8.6) that HW does automatically send STOP after
NACK was received. My measuerments confirm that.

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 36c79301044b715eb560eb74db7b519b7eea1c24..dcf9fc77cec7c4b693b087a924c4b437fd8100e2 100644 (file)
@@ -458,8 +458,8 @@ static irqreturn_t rcar_i2c_irq(int irq, void *ptr)
 
        /* Nack */
        if (msr & MNR) {
-               /* go to stop phase */
-               rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_STOP);
+               /* HW automatically sends STOP after received NACK */
+               rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_DATA);
                rcar_i2c_write(priv, ICMIER, RCAR_IRQ_STOP);
                rcar_i2c_flags_set(priv, ID_NACK);
                goto out;