blob: cde9e3fe33a4a485b2500563daadf5a63ac5fa79 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From: Russell King <rmk+kernel@armlinux.org.uk>
2Bcc: linux@mail.armlinux.org.uk
3Subject: [PATCH 6/7] i2c: pxa: use master-abort for device probes
4MIME-Version: 1.0
5Content-Disposition: inline
6Content-Transfer-Encoding: 8bit
7Content-Type: text/plain; charset="utf-8"
8
9Use master-abort to send the stop condition after an address cycle
10rather than resetting the controller.
11
12Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
13---
14 drivers/i2c/busses/i2c-pxa.c | 10 ++--------
15 1 file changed, 2 insertions(+), 8 deletions(-)
16
17--- a/drivers/i2c/busses/i2c-pxa.c
18+++ b/drivers/i2c/busses/i2c-pxa.c
19@@ -899,14 +899,8 @@ static void i2c_pxa_irq_txempty(struct p
20 icr &= ~ICR_ALDIE;
21 icr |= ICR_START | ICR_TB;
22 } else {
23- if (i2c->msg->len == 0) {
24- /*
25- * Device probes have a message length of zero
26- * and need the bus to be reset before it can
27- * be used again.
28- */
29- i2c_pxa_reset(i2c);
30- }
31+ if (i2c->msg->len == 0)
32+ icr |= ICR_MA;
33 i2c_pxa_master_complete(i2c, 0);
34 }
35