From: Hyunki Koo Date: Tue, 22 Jul 2014 13:37:21 +0000 (+0900) Subject: i2c: s3c2410: set 24Mhz to NCLK for fimc_is_i2c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0fb8c196c5c915c2f77ca4a63232c96f069aa9c1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git i2c: s3c2410: set 24Mhz to NCLK for fimc_is_i2c Change-Id: I18b8cbcec5a6c8ac8a37235805323755210db6e2 Signed-off-by: Hyunki Koo --- diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 4e2821e1b429..e3bfbea0e97f 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -934,12 +934,17 @@ static int s3c24xx_i2c_calcdivisor(struct s3c24xx_i2c *i2c, static int s3c24xx_i2c_clockrate(struct s3c24xx_i2c *i2c, unsigned int *got) { struct s3c2410_platform_i2c *pdata = i2c->pdata; - unsigned long clkin = clk_get_rate(i2c->rate_clk); + unsigned long clkin; unsigned int divs, div1; unsigned long target_frequency; u32 iiccon; int freq; + if (i2c->quirks & QUIRK_FIMC_I2C) + clkin = 24000000;/* NCLK is fixed 24Mhz */ + else + clkin = clk_get_rate(i2c->rate_clk); + i2c->clkrate = clkin; clkin /= 1000; /* clkin now in KHz */