i2c: s3c2410: change code for s3c24xx_i2c_enable_ack
authorHyunki Koo <hyunki00.koo@samsung.com>
Wed, 5 Mar 2014 06:28:45 +0000 (15:28 +0900)
committermyung-su.cha <myung-su.cha@samsung.com>
Thu, 10 May 2018 04:40:46 +0000 (13:40 +0900)
IICCON_BUS_RELEASE bit must be masked when IICCON_ACKEN is set
for fimc i2c

Change-Id: Ic80e4978560bf0aebefdf80ecc31420231d936ea
Signed-off-by: Hyunki Koo <hyunki00.koo@samsung.com>
drivers/i2c/busses/i2c-s3c2410.c

index 5f017bf1a7c7f78455d9e80b2bed8ff7ed81e232..b70a9bfa40d62f733bb391fb5ac580d852ea6670 100644 (file)
@@ -61,6 +61,7 @@ static LIST_HEAD(drvdata_list);
 #define S3C2410_IICCON_TXDIV_512       (1 << 6)
 #define S3C2410_IICCON_IRQEN           (1 << 5)
 #define S3C2410_IICCON_IRQPEND         (1 << 4)
+#define S3C2410_IICCON_BUS_RELEASE     (1 << 4)
 #define S3C2410_IICCON_SCALE(x)                ((x) & 0xf)
 #define S3C2410_IICCON_SCALEMASK       (0xf)
 
@@ -227,6 +228,8 @@ static inline void s3c24xx_i2c_enable_ack(struct s3c24xx_i2c *i2c)
        unsigned long tmp;
 
        tmp = readl(i2c->regs + S3C2410_IICCON);
+       if (i2c->quirks & QUIRK_FIMC_I2C)
+               tmp &= ~S3C2410_IICCON_BUS_RELEASE;
        writel(tmp | S3C2410_IICCON_ACKEN, i2c->regs + S3C2410_IICCON);
 }