Skip to contentSkip to conversation

i2c-omap: Make sure i2c bus is free before setting it to idle

PATCH In review Mathias Nyman 4 participants 4 messages Aug 26, 2010 – Sep 22, 2010 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c-omap: Make sure i2c bus is free before setting it to idle

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.

---
 drivers/i2c/busses/i2c-omap.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/i2c/busses/i2c-omap.c +2 -0
index 824ac1c..3271ce1 100644
@@ -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;
Signature · 1 line
1.5.6.5
#1 lore raw

Hi,

Quoted 7 lines · Nyman Mathias (Nokia-MS/Helsinki)

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.

adding linux-i2c and Ben Dooks to Cc list.

Quoted 24 lines

---
drivers/i2c/busses/i2c-omap.c | 2 ++

1 files changed, 2 insertions(+), 0 deletions(-)
drivers/i2c/busses/i2c-omap.c +2 -0
index 824ac1c..3271ce1 100644
@@ -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;
Signature · 6 lines
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
balbi

DefectiveByDesign.org
maintainer Acked-by
#2 lore raw
Quoted 7 lines · Felipe Balbi

Hi,

Quoted 4 lines · Nyman Mathias (Nokia-MS/Helsinki)

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.

Quoted 5 lines
Quoted 3 lines

This caused bus to timeout.

adding linux-i2c and Ben Dooks to Cc list.

Ben, can you please take this? The patchwork.kernel.org link is:

http://patchwork.kernel.org/patch/133641/

Or let Mathias know if he should repost.

Quoted 33 lines
Quoted 24 lines

---
drivers/i2c/busses/i2c-omap.c | 2 ++

1 files changed, 2 insertions(+), 0 deletions(-)
drivers/i2c/busses/i2c-omap.c +2 -0
index 824ac1c..3271ce1 100644
@@ -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;
Signature · 6 lines
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 7 lines
balbi

DefectiveByDesign.org
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 8 lines · Tony Lindgren
Quoted 7 lines · Felipe Balbi

Hi,

Quoted 4 lines · Nyman Mathias (Nokia-MS/Helsinki)

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.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

This caused bus to timeout.

adding linux-i2c and Ben Dooks to Cc list.

Ben, can you please take this? The patchwork.kernel.org link is:

thanks, added to for-linus/2636-rc6-i2c

Signature · 4 lines
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.