]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
I2C: OMAP: Fix the interrupt clearing in OMAP4
authorShubhrajyoti D <shubhrajyoti@ti.com>
Tue, 29 May 2012 10:56:15 +0000 (16:26 +0530)
committerWolfram Sang <w.sang@pengutronix.de>
Sun, 8 Jul 2012 10:49:13 +0000 (12:49 +0200)
On OMAP4 we were writing 1 to IRQENABLE_CLR which cleared only
the arbitration lost interrupt. The patch intends to fix the same by writing 0
to the IE register clearing all interrupts.

This is based on the work done by Vikram Pandita <vikram.pandita@ti.com>.

The  changes from the original patch ...
-  Does not use the IRQENABLE_CLR register to clear as it is not mentioned
  to be legacy register IRQENABLE_CLR helps in  atomically
  setting/clearing specific interrupts, instead use the OMAP_I2C_IE_REG as we
  are clearing all interrupts.

Cc: Vikram Pandita <vikram.pandita@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
drivers/i2c/busses/i2c-omap.c

index c851672eb6a85e4711198fcae2f421ba32741c67..bf07ffd83c1e009fa2a7a5259fb72158fc4880cf 100644 (file)
@@ -1127,10 +1127,8 @@ static int omap_i2c_runtime_suspend(struct device *dev)
        u16 iv;
 
        _dev->iestate = omap_i2c_read_reg(_dev, OMAP_I2C_IE_REG);
-       if (_dev->dtrev == OMAP_I2C_IP_VERSION_2)
-               omap_i2c_write_reg(_dev, OMAP_I2C_IP_V2_IRQENABLE_CLR, 1);
-       else
-               omap_i2c_write_reg(_dev, OMAP_I2C_IE_REG, 0);
+
+       omap_i2c_write_reg(_dev, OMAP_I2C_IE_REG, 0);
 
        if (_dev->rev < OMAP_I2C_OMAP1_REV_2) {
                iv = omap_i2c_read_reg(_dev, OMAP_I2C_IV_REG); /* Read clears */