linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: i2c: i2c-st: Fix return in case of arbitration lost
@ 2014-02-28 12:52 Maxime COQUELIN
       [not found] ` <1393591976-10771-1-git-send-email-maxime.coquelin-qxv4g6HH51o@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Maxime COQUELIN @ 2014-02-28 12:52 UTC (permalink / raw)
  To: Wolfram Sang, Maxime Coquelin, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	srinivas.kandagatla-qxv4g6HH51o, kernel-F5mvAk5X5gdBDgjK7y7TUQ

This patch fixes the error returned to the i2c_transfer function
to -EAGAIN in case of arbitratin lost, so that the retry mechanism
can be used.

Signed-off-by: Maxime Coquelin <maxime.coquelin-qxv4g6HH51o@public.gmane.org>
---
 drivers/i2c/busses/i2c-st.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c
index 9cf715d..8720161 100644
--- a/drivers/i2c/busses/i2c-st.c
+++ b/drivers/i2c/busses/i2c-st.c
@@ -574,7 +574,7 @@ static irqreturn_t st_i2c_isr_thread(int irq, void *data)
 		writel_relaxed(it, i2c_dev->base + SSC_IEN);
 
 		st_i2c_set_bits(i2c_dev->base + SSC_I2C, SSC_I2C_STOPG);
-		c->result = -EIO;
+		c->result = -EAGAIN;
 		break;
 
 	default:
-- 
1.9.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers: i2c: i2c-st: Fix return in case of arbitration lost
       [not found] ` <1393591976-10771-1-git-send-email-maxime.coquelin-qxv4g6HH51o@public.gmane.org>
@ 2014-03-10 16:34   ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2014-03-10 16:34 UTC (permalink / raw)
  To: Maxime COQUELIN
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	srinivas.kandagatla-qxv4g6HH51o, kernel-F5mvAk5X5gdBDgjK7y7TUQ

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

On Fri, Feb 28, 2014 at 01:52:56PM +0100, Maxime COQUELIN wrote:
> This patch fixes the error returned to the i2c_transfer function
> to -EAGAIN in case of arbitratin lost, so that the retry mechanism
> can be used.
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin-qxv4g6HH51o@public.gmane.org>

Applied to for-next, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-10 16:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-28 12:52 [PATCH] drivers: i2c: i2c-st: Fix return in case of arbitration lost Maxime COQUELIN
     [not found] ` <1393591976-10771-1-git-send-email-maxime.coquelin-qxv4g6HH51o@public.gmane.org>
2014-03-10 16:34   ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).