public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: rk3x: fix interrupt handling issue
@ 2014-08-08  9:41 Addy Ke
  2014-08-08 10:15 ` Heiko Stübner
  2014-08-08 16:34 ` Wolfram Sang
  0 siblings, 2 replies; 3+ messages in thread
From: Addy Ke @ 2014-08-08  9:41 UTC (permalink / raw)
  To: wsa, max.schwarz, heiko, olof, dianders
  Cc: linux-i2c, linux-kernel, cf, xjq, huangtao, zyw, yzq, hj,
	kever.yang, hl, caesar.wang, zhengsq, Addy Ke

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 <addy.ke@rock-chips.com>
---
 drivers/i2c/busses/i2c-rk3x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
index 9e3084c..eab49e6 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) {
-- 
1.8.3.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-08 16:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-08  9:41 [PATCH] i2c: rk3x: fix interrupt handling issue Addy Ke
2014-08-08 10:15 ` Heiko Stübner
2014-08-08 16:34 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox