Skip to content

Commit

Permalink
i2c: rk3x: fix interrupt handling issue
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
  • Loading branch information
addy ke authored and Wolfram Sang committed Aug 8, 2014
1 parent 64bdfbf commit 9c5f7ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-rk3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9c5f7ca

Please sign in to comment.