diff mbox

[RFC,1/5] i2c: omap: ack only reported events

Message ID 1417617242-16869-2-git-send-email-al.kochet@gmail.com
State RFC
Headers show

Commit Message

Alexander Kochetkov Dec. 3, 2014, 2:33 p.m. UTC
Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
---
 drivers/i2c/busses/i2c-omap.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 4563200..53b4234 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1059,7 +1059,11 @@  omap_i2c_isr_thread(int this_irq, void *dev_id)
 
 		if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
 					OMAP_I2C_STAT_AL)) {
-			omap_i2c_ack_stat(dev, (OMAP_I2C_STAT_RRDY |
+			/*
+			 * These are pending events not handled in time
+			 * due to ISR latency.
+			 */
+			omap_i2c_ack_stat(dev, stat & (OMAP_I2C_STAT_RRDY |
 						OMAP_I2C_STAT_RDR |
 						OMAP_I2C_STAT_XRDY |
 						OMAP_I2C_STAT_XDR |