2020-05-21 08:57:27 +00:00
|
|
|
From: Russell King <rmk+kernel@armlinux.org.uk>
|
|
|
|
Bcc: linux@mail.armlinux.org.uk
|
|
|
|
Subject: [PATCH 6/7] i2c: pxa: use master-abort for device probes
|
|
|
|
MIME-Version: 1.0
|
|
|
|
Content-Disposition: inline
|
|
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Content-Type: text/plain; charset="utf-8"
|
|
|
|
|
|
|
|
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>
|
|
|
|
---
|
|
|
|
drivers/i2c/busses/i2c-pxa.c | 10 ++--------
|
|
|
|
1 file changed, 2 insertions(+), 8 deletions(-)
|
|
|
|
|
|
|
|
--- a/drivers/i2c/busses/i2c-pxa.c
|
|
|
|
+++ b/drivers/i2c/busses/i2c-pxa.c
|
2020-05-25 16:24:54 +00:00
|
|
|
@@ -899,14 +899,8 @@ static void i2c_pxa_irq_txempty(struct p
|
2020-05-21 08:57:27 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|