Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757767Ab3JOGVv (ORCPT ); Tue, 15 Oct 2013 02:21:51 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:36826 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751603Ab3JOGVs (ORCPT ); Tue, 15 Oct 2013 02:21:48 -0400 X-AuditID: cbfee691-b7fe06d0000008c4-22-525cdefa2e14 From: Naveen Krishna Chatradhi To: linux-i2c@vger.kernel.org Cc: t.figa@samsung.com, sjg@chromium.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, wsa@the-dreams.de, ben-linux@fluff.org, grant.likely@secretlab.ca, broonie@kernel.org, dianders@chromium.org, cpgs@samsung.com Subject: [PATCH v2] i2c: s3c2410: dont need CPU_FREQ transitions for exynos series Date: Tue, 15 Oct 2013 11:53:52 +0530 Message-id: <1381818232-12542-1-git-send-email-ch.naveen@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1381490814-20890-1-git-send-email-ch.naveen@samsung.com> References: <1381490814-20890-1-git-send-email-ch.naveen@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprEIsWRmVeSWpSXmKPExsWyRsSkRvfXvZgggwn/DS0mrTvAZDH14RM2 i5eHNC3OLjvIZvHqzEY2i46/XxgtLu+aw2Yx4/w+JotvW7YxWqyf8ZrFYuWJWcwO3B6zGy6y ePxd9YLZY9OqTjaPvi2rGD1+vtTxOHnqCYvH501yAexRXDYpqTmZZalF+nYJXBk9cw6wFpzk rrjYM4OpgfEMZxcjJ4eEgInEhbdr2SBsMYkL99YD2VwcQgJLGSXeTVnLBFN0bvpfdojEIkaJ rkmtjBBOD5PErTvtLCBVbAJmEgcXrWYHsUUEZCVaH6xhBrGZBd4zSpzq0AGxhQVCJKbdOw+2 jkVAVaLvUSsriM0r4Crx4/dERohtihLdzyaA1XAKuEm87zoIFOcAWuYq0X1dDWSvhM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knhDYxNz U2NTSxMLEzNL0oSVxHkPtloHCgmkJ5akZqemFqQWwWxh4uCUamB069XW+xNy7c0HWXVFkZ3x 5hyaFyIOrDh8guntiZe2OxN+3Vm+7tq5SdZVoRvypEX79P+bH5bkldN95totPmny9sklRhdc UoMi7s74qdNdsn7+whWX3oZqSn2OqjvH9kr09JaoZ8mJR/oPlnyT5VEtiq12PKTz8rb5vEWu +8M43r0+NOPI0gMaSizFGYmGWsxFxYkATBJg6AIDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1681 Lines: 50 For Exynos4 and Exynos5 SoCs from Samsung the i2c clock is based on a fixed 66 MHz peripheral clock, and therefore is completely independent of the cpu frequency. Thus, registering for a CPU freq notifier is very wasteful. This patch modifes the code such that, i2c bus registers to cpu_freq_transition only if CONFIG_CPU_FREQ_S3C24XX is enabled. This change should save a bunch of cpufreq transitions calls which does not apply to exynos SoCs. Signed-off-by: Naveen Krishna Chatradhi --- Changes since v1: Use CONFIG_CPU_FREQ_S3C24XX instead of (CONFIG_CPU_FREQ & !CONFIG_EXYNOS) As commented by Tomasz drivers/i2c/busses/i2c-s3c2410.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index cab1c91..97f14f7 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -123,7 +123,7 @@ struct s3c24xx_i2c { struct s3c2410_platform_i2c *pdata; int gpios[2]; struct pinctrl *pctrl; -#ifdef CONFIG_CPU_FREQ +#if defined(CONFIG_CPU_FREQ_S3C24XX) struct notifier_block freq_transition; #endif }; @@ -843,7 +843,7 @@ static int s3c24xx_i2c_clockrate(struct s3c24xx_i2c *i2c, unsigned int *got) return 0; } -#ifdef CONFIG_CPU_FREQ +#if defined(CONFIG_CPU_FREQ_S3C24XX) #define freq_to_i2c(_n) container_of(_n, struct s3c24xx_i2c, freq_transition) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/