diff options
author | Shubhrajyoti D <shubhrajyoti@ti.com> | 2012-05-29 06:56:15 -0400 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-07-08 06:49:13 -0400 |
commit | bd16c82f67a267b533e747c74c2fcd23578d4601 (patch) | |
tree | b941de4d33762cf1f1a67e8730c179b611af6d89 /drivers/i2c/busses/i2c-omap.c | |
parent | 247405160093cf88cb59242f877543dd28e93df1 (diff) |
I2C: OMAP: Fix the interrupt clearing in OMAP4
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>
Diffstat (limited to 'drivers/i2c/busses/i2c-omap.c')
-rw-r--r-- | drivers/i2c/busses/i2c-omap.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index c851672eb6a..bf07ffd83c1 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
@@ -1127,10 +1127,8 @@ static int omap_i2c_runtime_suspend(struct device *dev) | |||
1127 | u16 iv; | 1127 | u16 iv; |
1128 | 1128 | ||
1129 | _dev->iestate = omap_i2c_read_reg(_dev, OMAP_I2C_IE_REG); | 1129 | _dev->iestate = omap_i2c_read_reg(_dev, OMAP_I2C_IE_REG); |
1130 | if (_dev->dtrev == OMAP_I2C_IP_VERSION_2) | 1130 | |
1131 | omap_i2c_write_reg(_dev, OMAP_I2C_IP_V2_IRQENABLE_CLR, 1); | 1131 | omap_i2c_write_reg(_dev, OMAP_I2C_IE_REG, 0); |
1132 | else | ||
1133 | omap_i2c_write_reg(_dev, OMAP_I2C_IE_REG, 0); | ||
1134 | 1132 | ||
1135 | if (_dev->rev < OMAP_I2C_OMAP1_REV_2) { | 1133 | if (_dev->rev < OMAP_I2C_OMAP1_REV_2) { |
1136 | iv = omap_i2c_read_reg(_dev, OMAP_I2C_IV_REG); /* Read clears */ | 1134 | iv = omap_i2c_read_reg(_dev, OMAP_I2C_IV_REG); /* Read clears */ |