Thread (24 messages) 24 messages, 3 authors, 2015-07-13

[PATCH-v3 03/11] i2c: pxa: Return I2C_RETRY when timeout in pio mode

flat view
STALE4116d SUPERSEDED: 4 (4M)

From: Vaibhav Hiremath <hidden>
Date: 2015-07-06 19:27:58
Also in: linux-arm-kernel, linux-i2c, lkml
Subsystem: i2c subsystem, i2c subsystem host drivers, the rest · Maintainers: Andi Shyti, Linus Torvalds

Revision v3 of 6 in this series; 1 review trailer.

Revisions (6)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v2 [diff vs current]
  4. v2 [diff vs current]
  5. v3 current
  6. v4 [diff vs current]
From: Shouming Wang <redacted>

In case of timeout in pio mode of operation return I2C_RETRY.
This behavior will be same as interrupt mode of operation.

Signed-off-by: Shouming Wang <redacted>
[vaibhav.hiremath-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org: Updated changelog]
Signed-off-by: Vaibhav Hiremath <redacted>
Acked-by: Robert Jarzmik <redacted>
---
 drivers/i2c/busses/i2c-pxa.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 023e59f..632008f 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -745,8 +745,10 @@ static int i2c_pxa_do_pio_xfer(struct pxa_i2c *i2c,
 	ret = i2c->msg_idx;
 
 out:
-	if (timeout == 0)
+	if (timeout == 0) {
 		i2c_pxa_scream_blue_murder(i2c, "timeout");
+		ret = I2C_RETRY;
+	}
 
 	return ret;
 }
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help