diff options
author | Kohtaro Hashimoto <hashi@ti.com> | 2012-07-09 19:43:45 +0300 |
---|---|---|
committer | Dmytro Kedrovskyi <x0169235@ti.com> | 2012-07-11 17:47:57 +0300 |
commit | 0970b1be7f6cb05e48fcb1cb76fd9bcbdb20f2bb (patch) | |
tree | ab55476f6e4bd1fbb7072411959dde9ae74c231c | |
parent | 6eaf87d88289afd4a6c60069e8e5935a0e5f6a49 (diff) | |
download | kernel_samsung_espresso10-0970b1be7f6cb05e48fcb1cb76fd9bcbdb20f2bb.zip kernel_samsung_espresso10-0970b1be7f6cb05e48fcb1cb76fd9bcbdb20f2bb.tar.gz kernel_samsung_espresso10-0970b1be7f6cb05e48fcb1cb76fd9bcbdb20f2bb.tar.bz2 |
OMAP: I2C: Disable interrupts in omap_i2c_bus_clear()
Interrupts that occur during omap_i2c_bus_clear() can cause to
erroneous behaviour in interrupt handler, i.e. multiple printing of
"RRDY IRQ while no data requested" message. So disable interrupts
in omap_i2c_bus_clear() function since they can't be handled correctly.
Change-Id: If4525c93284766d0a2705d7ca4d1f962e3cc4b15
Signed-off-by: Semen Protsenko <semen.protsenko@ti.com>
-rw-r--r-- | drivers/i2c/busses/i2c-omap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index e33b928..c6ae218 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -521,6 +521,8 @@ static int omap_i2c_bus_clear(struct omap_i2c_dev *dev) * at least 9 clock pulses on SCL. Put the I2C in a test mode so it * will output a continuous clock on SCL. */ + disable_irq(dev->irq); + w = omap_i2c_read_reg(dev, OMAP_I2C_SYSTEST_REG); omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN); omap_i2c_write_reg(dev, OMAP_I2C_SYSTEST_REG, @@ -530,6 +532,9 @@ static int omap_i2c_bus_clear(struct omap_i2c_dev *dev) omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0); omap_i2c_reset(dev); omap_i2c_init(dev); + + enable_irq(dev->irq); + return omap_i2c_wait_for_bb(dev); } |