diff mbox

OMAP3: I2C: Clean up Errata 1p153 handling

Message ID 1272466739-2847-1-git-send-email-manjugk@ti.com (mailing list archive)
State Accepted
Commit f95ba23e386509330595c45052ab4cef453ca262
Delegated to: Tony Lindgren
Headers show

Commit Message

manjugk manjugk April 28, 2010, 2:58 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 5f5207e..0caa8fe 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -168,6 +168,7 @@  enum {
 
 /* Errata definitions */
 #define I2C_OMAP_ERRATA_I207		(1 << 0)
+#define I2C_OMAP3_1P153			(1 << 1)
 
 struct omap_i2c_dev {
 	struct device		*dev;
@@ -946,7 +947,7 @@  complete:
 					break;
 				}
 
-				if ((dev->rev <= OMAP_I2C_REV_ON_3430) &&
+				if ((dev->errata & I2C_OMAP3_1P153) &&
 				    errata_omap3_1p153(dev, &stat, &err))
 					goto complete;
 
@@ -1049,6 +1050,9 @@  omap_i2c_probe(struct platform_device *pdev)
 
 	dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG) & 0xff;
 
+	if (dev->rev <= OMAP_I2C_REV_ON_3430)
+		dev->errata |= I2C_OMAP3_1P153;
+
 	if (!(cpu_class_is_omap1() || cpu_is_omap2420())) {
 		u16 s;