diff mbox series

[v7,04/34] i2c: tegra: Mask interrupt in tegra_i2c_issue_bus_clear()

Message ID 20200908224006.25636-5-digetx@gmail.com
State Accepted
Commit ed022e5dd3a044b95a68d685d2d2871ce31351df
Headers show
Series Improvements for Tegra I2C driver | expand

Commit Message

Dmitry Osipenko Sept. 8, 2020, 10:39 p.m. UTC
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.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/i2c/busses/i2c-tegra.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Thierry Reding Sept. 17, 2020, 11:18 a.m. UTC | #1
On Wed, Sep 09, 2020 at 01:39:36AM +0300, Dmitry Osipenko wrote:
> 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.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/i2c/busses/i2c-tegra.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Thierry Reding <treding@nvidia.com>
Thierry Reding Sept. 21, 2020, 10:18 a.m. UTC | #2
On Wed, 09 Sep 2020 01:39:36 +0300, Dmitry Osipenko wrote:
> 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.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> Reviewed-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/i2c/busses/i2c-tegra.c | 2 ++
>  1 file changed, 2 insertions(+)

Tested-by: Thierry Reding <treding@nvidia.com>
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 88d6e7bb14a2..1d1ce266255a 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -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;