i2c: tegra: Mask interrupt in tegra_i2c_issue_bus_clear()
authorDmitry Osipenko <digetx@gmail.com>
Tue, 29 Sep 2020 22:18:47 +0000 (01:18 +0300)
committerWolfram Sang <wsa@kernel.org>
Mon, 5 Oct 2020 20:57:39 +0000 (22:57 +0200)
The tegra_i2c_issue_bus_clear() may fail and in this case BUS_CLR_DONE
stays unmasked. Hence let's mask it for consistency. This patch doesn't
fix any known problems.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-tegra.c

index 88d6e7b..1d1ce26 100644 (file)
@@ -1149,6 +1149,8 @@ static int tegra_i2c_issue_bus_clear(struct i2c_adapter *adap)
 
        time_left = tegra_i2c_wait_completion_timeout(
                        i2c_dev, &i2c_dev->msg_complete, 50);
+       tegra_i2c_mask_irq(i2c_dev, I2C_INT_BUS_CLR_DONE);
+
        if (time_left == 0) {
                dev_err(i2c_dev->dev, "timed out for bus clear\n");
                return -ETIMEDOUT;