aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTasslehoff Kjappfot <tasskjapp@gmail.com>2012-05-29 06:56:20 -0400
committerWolfram Sang <w.sang@pengutronix.de>2012-07-08 06:49:14 -0400
commit9aa8ec676b6ef151ab11868d16a928d92410d25e (patch)
treef045e2b122e4d147b5ef5d7c5e7ad0adee18a2ed /drivers
parent3b0fb97c8dc476935670706873c27a474191ccce (diff)
I2C: OMAP: prevent the overwrite of the errata flags
i2c_probe set the dev->errata flag, but omap_i2c_init cleared the flag again. Prevent the overwrite of the errata flags.Move the errata handling to a unified place in probe to prevent such errors. Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Tasslehoff Kjappfot <tasskjapp@gmail.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/busses/i2c-omap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index c39b72f4a278..6129cb870573 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -427,11 +427,6 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
427 /* Take the I2C module out of reset: */ 427 /* Take the I2C module out of reset: */
428 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN); 428 omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN);
429 429
430 dev->errata = 0;
431
432 if (dev->flags & OMAP_I2C_FLAG_APPLY_ERRATA_I207)
433 dev->errata |= I2C_OMAP_ERRATA_I207;
434
435 /* Enable interrupts */ 430 /* Enable interrupts */
436 dev->iestate = (OMAP_I2C_IE_XRDY | OMAP_I2C_IE_RRDY | 431 dev->iestate = (OMAP_I2C_IE_XRDY | OMAP_I2C_IE_RRDY |
437 OMAP_I2C_IE_ARDY | OMAP_I2C_IE_NACK | 432 OMAP_I2C_IE_ARDY | OMAP_I2C_IE_NACK |
@@ -1019,6 +1014,11 @@ omap_i2c_probe(struct platform_device *pdev)
1019 1014
1020 dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG) & 0xff; 1015 dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG) & 0xff;
1021 1016
1017 dev->errata = 0;
1018
1019 if (dev->flags & OMAP_I2C_FLAG_APPLY_ERRATA_I207)
1020 dev->errata |= I2C_OMAP_ERRATA_I207;
1021
1022 if (dev->rev <= OMAP_I2C_REV_ON_3430) 1022 if (dev->rev <= OMAP_I2C_REV_ON_3430)
1023 dev->errata |= I2C_OMAP3_1P153; 1023 dev->errata |= I2C_OMAP3_1P153;
1024 1024