mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
i2c: rk3x: Leave the irq handle if received nack irq
In the TRX mode, if there was a nack signal at the hardware's tx, we can get start and nack ipd from the I2C_IPD register, which will enter nack process, send stop command, change the state to stop, and enter the handler of stop irq, but the stop irq may not be generated, it has a latency. So the log will like this: [ 69.961944] rk3x-i2c ff650000.i2c: unexpected irq in STOP: 0x10 [ 70.959690] rk3x-i2c ff650000.i2c: timeout, ipd: 0x00, state: 4 This error log will confuse us, it is not easier to locate the problem, we should get nack error at this time, and processing stop interrupt at the next, then complete this i2c job. Change-Id: I073ef288557b1b6f525d936e8f32d9d165c81ec4 Signed-off-by: David Wu <david.wu@rock-chips.com>
This commit is contained in:
@@ -511,8 +511,10 @@ static irqreturn_t rk3x_i2c_irq(int irqno, void *dev_id)
|
||||
|
||||
ipd &= ~REG_INT_NAKRCV;
|
||||
|
||||
if (!(i2c->msg->flags & I2C_M_IGNORE_NAK))
|
||||
if (!(i2c->msg->flags & I2C_M_IGNORE_NAK)) {
|
||||
rk3x_i2c_stop(i2c, -ENXIO);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
/* is there anything left to handle? */
|
||||
|
||||
Reference in New Issue
Block a user