From: Wolfram Sang <wsa+rene...@sang-engineering.com>

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+rene...@sang-engineering.com>
---
 drivers/i2c/busses/i2c-rcar.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 36c79301044b71..dcf9fc77cec7c4 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -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;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to