From 8b348ecc8160d414d7b58d20142398f5d321538c Mon Sep 17 00:00:00 2001 From: Hyunki Koo Date: Wed, 5 Mar 2014 15:28:45 +0900 Subject: [PATCH] i2c: s3c2410: change code for s3c24xx_i2c_enable_ack IICCON_BUS_RELEASE bit must be masked when IICCON_ACKEN is set for fimc i2c Change-Id: Ic80e4978560bf0aebefdf80ecc31420231d936ea Signed-off-by: Hyunki Koo --- drivers/i2c/busses/i2c-s3c2410.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 5f017bf1a7c7..b70a9bfa40d6 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -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); } -- 2.20.1