i2c: s3c2410: Fix initial sequnce for fimc-is's I2C
authorDongsu Ha <dsfine.ha@samsung.com>
Fri, 10 Jan 2014 04:29:38 +0000 (13:29 +0900)
committermyung-su.cha <myung-su.cha@samsung.com>
Thu, 10 May 2018 04:40:43 +0000 (13:40 +0900)
Change-Id: I14068750fff931b09ab0a31d6cdb041d7b4e915f
Signed-off-by: Dongsu Ha <dsfine.ha@samsung.com>
drivers/i2c/busses/i2c-s3c2410.c

index fe16e69a2bb5ac780fa386d09852d74f02a0273a..2fa1b44617f8489b47b5530bd0317571089d756e 100644 (file)
@@ -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