public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1]  Patch for I2C transmit overflow error
@ 2008-08-07 14:10 chandra shekhar
  2008-08-07 23:38 ` David Brownell
  0 siblings, 1 reply; 8+ messages in thread
From: chandra shekhar @ 2008-08-07 14:10 UTC (permalink / raw)
  To: linux-omap

Hi,

This patch is to fix I2C transmit overflow error.
I guess it should fix the OSK5912 error. I dont have the board to test it.

Regards,
Chandra Shekhar

Signed-off-by: Chandra Shekhar< x0044955@ti.com>
---
 drivers/i2c/busses/i2c-omap.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

Index: linux-omap-2.6/drivers/i2c/busses/i2c-omap.c
===================================================================
--- linux-omap-2.6.orig/drivers/i2c/busses/i2c-omap.c	2008-08-07
19:30:00.000000000 +0530
+++ linux-omap-2.6/drivers/i2c/busses/i2c-omap.c	2008-08-07 19:30:19.000000000
+0530
@@ -661,6 +661,7 @@
 				}
 			}
 			omap_i2c_ack_stat(dev, stat & (OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR));
+			continue;
 		}
 		if (stat & (OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR)) {
 			u8 num_bytes = 1;
@@ -694,13 +695,14 @@
 				omap_i2c_write_reg(dev, OMAP_I2C_DATA_REG, w);
 			}
 			omap_i2c_ack_stat(dev, stat & (OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
+			continue;
 		}
 		if (stat & OMAP_I2C_STAT_ROVR) {
 			dev_err(dev->dev, "Receive overrun\n");
 			dev->cmd_err |= OMAP_I2C_STAT_ROVR;
 		}
 		if (stat & OMAP_I2C_STAT_XUDF) {
-			dev_err(dev->dev, "Transmit overflow\n");
+			dev_err(dev->dev, "Transmit underflow\n");
 			dev->cmd_err |= OMAP_I2C_STAT_XUDF;
 		}
 	}



^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] Patch for I2C transmit overflow error
@ 2009-01-06 20:12 Jason Marini
  2009-01-09  3:11 ` shekhar, chandra
  0 siblings, 1 reply; 8+ messages in thread
From: Jason Marini @ 2009-01-06 20:12 UTC (permalink / raw)
  To: linux-omap

>>This patch is to fix I2C transmit overflow error.
>>I guess it should fix the OSK5912 error. I dont have the board to test it.
>
>Yes, it makes those error reports go away. I'd say to merge this patch.

Chandra, why would the transmit underflow (XDR) status sometimes be
set at the same time as the XRDY status?  Why would you want to ignore
XDR (using 'continue') if XRDY is set?

Thank you in advance for clearing this up for me.

-Jason Marini

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

end of thread, other threads:[~2009-01-09 15:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-07 14:10 [PATCH 1/1] Patch for I2C transmit overflow error chandra shekhar
2008-08-07 23:38 ` David Brownell
2008-08-08  6:19   ` Tony Lindgren
2008-08-08  8:01     ` David Brownell
  -- strict thread matches above, loose matches on Subject: below --
2009-01-06 20:12 Jason Marini
2009-01-09  3:11 ` shekhar, chandra
2009-01-09 13:19   ` Jason Marini
2009-01-09 15:07     ` shekhar, chandra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox