]> git.karo-electronics.de Git - linux-beck.git/commitdiff
i2c: rcar: don't issue stop when HW does it automatically
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 19 Nov 2015 15:56:47 +0000 (16:56 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 30 Nov 2015 13:21:50 +0000 (14:21 +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 d91acc116315542773487cd8079d4ba6d4422fb7..87fccf20fc4c34cadd056f6b19c9332de67719ca 100644 (file)
@@ -455,8 +455,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;