i2c: pxa: use master-abort for device probes
authorRussell King <rmk+kernel@armlinux.org.uk>
Wed, 6 May 2020 09:36:43 +0000 (10:36 +0100)
committerWolfram Sang <wsa@kernel.org>
Tue, 12 May 2020 10:37:30 +0000 (12:37 +0200)
Use master-abort to send the stop condition after an address cycle
rather than resetting the controller.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-pxa.c

index a72d07bdb7938ea3d5de25e3022e84bde5234df8..0e194d6cd1b56b683a202afaaf89fb0e231156c3 100644 (file)
@@ -940,14 +940,8 @@ static void i2c_pxa_irq_txempty(struct pxa_i2c *i2c, u32 isr)
                icr &= ~ICR_ALDIE;
                icr |= ICR_START | ICR_TB;
        } else {
-               if (i2c->msg->len == 0) {
-                       /*
-                        * Device probes have a message length of zero
-                        * and need the bus to be reset before it can
-                        * be used again.
-                        */
-                       i2c_pxa_reset(i2c);
-               }
+               if (i2c->msg->len == 0)
+                       icr |= ICR_MA;
                i2c_pxa_master_complete(i2c, 0);
        }