From: addy ke Date: Fri, 8 Aug 2014 09:41:40 +0000 (+0800) Subject: i2c: rk3x: fix interrupt handling issue X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9c5f7cad3acc69ce623d04d646950183a759949e;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git i2c: rk3x: fix interrupt handling issue If slave holds scl, I2C_IPD[7] will be set 1 by controller for debugging. Driver must ignore it. [ 5.752391] rk3x-i2c ff160000.i2c: unexpected irq in WRITE: 0x80 [ 5.939027] rk3x-i2c ff160000.i2c: timeout, ipd: 0x80, state: 4 Signed-off-by: Addy Ke Reviewed-by: Heiko Stuebner Signed-off-by: Wolfram Sang Cc: stable@kernel.org --- diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c index a9791509966a..69e11853e8bf 100644 --- a/drivers/i2c/busses/i2c-rk3x.c +++ b/drivers/i2c/busses/i2c-rk3x.c @@ -399,7 +399,7 @@ static irqreturn_t rk3x_i2c_irq(int irqno, void *dev_id) } /* is there anything left to handle? */ - if (unlikely(ipd == 0)) + if (unlikely((ipd & REG_INT_ALL) == 0)) goto out; switch (i2c->state) {