diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-tegra.c')
-rw-r--r-- | drivers/i2c/busses/i2c-tegra.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index e978635e60f0..55e5ea62ccee 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c | |||
@@ -516,6 +516,14 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, | |||
516 | if (likely(i2c_dev->msg_err == I2C_ERR_NONE)) | 516 | if (likely(i2c_dev->msg_err == I2C_ERR_NONE)) |
517 | return 0; | 517 | return 0; |
518 | 518 | ||
519 | /* | ||
520 | * NACK interrupt is generated before the I2C controller generates the | ||
521 | * STOP condition on the bus. So wait for 2 clock periods before resetting | ||
522 | * the controller so that STOP condition has been delivered properly. | ||
523 | */ | ||
524 | if (i2c_dev->msg_err == I2C_ERR_NO_ACK) | ||
525 | udelay(DIV_ROUND_UP(2 * 1000000, i2c_dev->bus_clk_rate)); | ||
526 | |||
519 | tegra_i2c_init(i2c_dev); | 527 | tegra_i2c_init(i2c_dev); |
520 | if (i2c_dev->msg_err == I2C_ERR_NO_ACK) { | 528 | if (i2c_dev->msg_err == I2C_ERR_NO_ACK) { |
521 | if (msg->flags & I2C_M_IGNORE_NAK) | 529 | if (msg->flags & I2C_M_IGNORE_NAK) |