Skip to contentSkip to conversation

i2c: i2c-omap: Fix BUFSTAT_REG reading

PATCH In review [email protected] 2 participants 2 messages Nov 10, 2008

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

PATCH 1/1 i2c: i2c-omap: Fix BUFSTAT_REG reading

From: Eero Nurkkala <[email protected]>

---
 drivers/i2c/busses/i2c-omap.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-omap.c +3 -2
index f4d1edc..9ae3ad3 100644
@@ -642,8 +642,9 @@ omap_i2c_isr(int this_irq, void *dev_id)
 				if (stat & OMAP_I2C_STAT_RRDY)
 					num_bytes = dev->fifo_size;
 				else
-					num_bytes = omap_i2c_read_reg(dev,
-							OMAP_I2C_BUFSTAT_REG);
+					num_bytes = (omap_i2c_read_reg(dev,
+							OMAP_I2C_BUFSTAT_REG)
+							>> 8) & 0x3F;
 			}
 			while (num_bytes) {
 				num_bytes--;
Signature · 1 line
1.5.2
#1 lore raw
Quoted 2 lines · On Mon, Nov 10, 2008 at 12:46:49PM +0200, ext [email protected] wrote:

From: Eero Nurkkala <[email protected]>

you need to put a patch description here. Ditto to other patches.

Quoted 29 lines
---
 drivers/i2c/busses/i2c-omap.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-omap.c +3 -2
index f4d1edc..9ae3ad3 100644
@@ -642,8 +642,9 @@ omap_i2c_isr(int this_irq, void *dev_id)
 				if (stat & OMAP_I2C_STAT_RRDY)
 					num_bytes = dev->fifo_size;
 				else
-					num_bytes = omap_i2c_read_reg(dev,
-							OMAP_I2C_BUFSTAT_REG);
+					num_bytes = (omap_i2c_read_reg(dev,
+							OMAP_I2C_BUFSTAT_REG)
+							>> 8) & 0x3F;
 			}
 			while (num_bytes) {
 				num_bytes--;
Signature · 6 lines
1.5.2

--
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 · 1 line
balbi