From 7f1b7208ab236bc8c803235d083a6c06926cbf93 Mon Sep 17 00:00:00 2001 From: Dongsu Ha Date: Fri, 10 Jan 2014 13:29:38 +0900 Subject: [PATCH] i2c: s3c2410: Fix initial sequnce for fimc-is's I2C Change-Id: I14068750fff931b09ab0a31d6cdb041d7b4e915f Signed-off-by: Dongsu Ha --- drivers/i2c/busses/i2c-s3c2410.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index fe16e69a2bb5..2fa1b44617f8 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -1249,12 +1249,14 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) /* initialise the i2c controller */ - clk_prepare_enable(i2c->clk); - ret = s3c24xx_i2c_init(i2c); - clk_disable(i2c->clk); - if (ret != 0) { - dev_err(&pdev->dev, "I2C controller init failed\n"); - return ret; + if (!(i2c->quirks & QUIRK_FIMC_I2C)) { + clk_prepare_enable(i2c->clk); + ret = s3c24xx_i2c_init(i2c); + clk_disable_unprepare(i2c->clk); + if (ret != 0) { + dev_err(&pdev->dev, "I2C controller init failed\n"); + return ret; + } } /* find the IRQ for this unit (note, this relies on the init call to * ensure no current IRQs pending -- 2.20.1