From: Kisang Lee Date: Mon, 9 Jun 2014 11:45:01 +0000 (+0900) Subject: i2c: s3c24xx: Modification codes to avoid unexpected interrupts X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e01fbac60a1539717c87815a3cb5512898e88ed9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git i2c: s3c24xx: Modification codes to avoid unexpected interrupts Change-Id: I46ec0faad45d01b0629f1f625044e9a48b105be5 Signed-off-by: Kisang Lee --- diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 80eb0fc63476..4e2821e1b429 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -756,8 +756,11 @@ static void s3c24xx_i2c_wait_idle(struct s3c24xx_i2c *i2c) iicstat = readl(i2c->regs + S3C2410_IICSTAT); } - if (iicstat & S3C2410_IICSTAT_START) + if (iicstat & S3C2410_IICSTAT_START) { dev_warn(i2c->dev, "timeout waiting for bus idle\n"); + if (i2c->state != STATE_STOP) + s3c24xx_i2c_stop(i2c, -ENXIO); + } } /* s3c24xx_i2c_doxfer