All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c-omap: Make sure i2c bus is free before setting it to idle
@ 2010-08-26  7:36 Mathias Nyman
  2010-08-26  7:41 ` Felipe Balbi
  0 siblings, 1 reply; 4+ messages in thread
From: Mathias Nyman @ 2010-08-26  7:36 UTC (permalink / raw)
  To: linux-omap; +Cc: Mathias Nyman

If the i2c bus receives an interrupt with both BB (bus busy) and
ARDY (register access ready) statuses set during the tranfer of the last message
the bus was put to idle while still busy.

This caused bus to timeout.

Signed-off-by: Mathias Nyman <mathias.nyman@nokia.com>
---
 drivers/i2c/busses/i2c-omap.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 824ac1c..3271ce1 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -602,6 +602,8 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
 	if (r == 0)
 		r = num;
+
+	omap_i2c_wait_for_bb(dev);
 out:
 	omap_i2c_idle(dev);
 	return r;
-- 
1.5.6.5


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

end of thread, other threads:[~2010-09-22  0:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-26  7:36 [PATCH] i2c-omap: Make sure i2c bus is free before setting it to idle Mathias Nyman
2010-08-26  7:41 ` Felipe Balbi
2010-09-16 22:40   ` Tony Lindgren
     [not found]     ` <20100916224050.GU29610-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2010-09-22  0:07       ` Ben Dooks

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.