From patchwork Fri Oct 11 11:26:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naveen Krishna Chatradhi X-Patchwork-Id: 3023421 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9BF849F245 for ; Fri, 11 Oct 2013 11:24:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9001B20335 for ; Fri, 11 Oct 2013 11:24:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04AFC20322 for ; Fri, 11 Oct 2013 11:24:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752105Ab3JKLYo (ORCPT ); Fri, 11 Oct 2013 07:24:44 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:23778 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751266Ab3JKLYn (ORCPT ); Fri, 11 Oct 2013 07:24:43 -0400 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MUI00GC1515EAP0@mailout2.samsung.com>; Fri, 11 Oct 2013 20:24:41 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.123]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id B5.DA.29948.9FFD7525; Fri, 11 Oct 2013 20:24:41 +0900 (KST) X-AuditID: cbfee691-b7f4a6d0000074fc-28-5257dff99e39 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id A8.D3.09055.8FFD7525; Fri, 11 Oct 2013 20:24:40 +0900 (KST) Received: from naveen-linux.sisodomain.com ([107.108.83.161]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MUI00K1E5103G80@mmp2.samsung.com>; Fri, 11 Oct 2013 20:24:40 +0900 (KST) From: Naveen Krishna Chatradhi To: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: wsa@the-dreams.de, khali@linux-fr.org, ben-linux@fluff.org, grant.likely@secretlab.ca, devicetree-discuss@lists.ozlabs.org, sjg@chromium.org, naveenkrishna.ch@gmail.com, broonie@opensource.wolfsonmicro.com, diander@google.com, cpgs@samsung.com Subject: [PATCH] i2c: s3c2410: dont need CPU_FREQ transitions for exynos series Date: Fri, 11 Oct 2013 16:56:54 +0530 Message-id: <1381490814-20890-1-git-send-email-ch.naveen@samsung.com> X-Mailer: git-send-email 1.7.10.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCIsWRmVeSWpSXmKPExsWyRsSkWvfn/fAgg80LOCwmrTvAZPFv9ik2 i5eHNC0OzH7IatHXvYbJ4tWZjWwWjX8jLTr+fmG0uLxrDpvFjPP7mCwWbfvPbPFtyzZGi5Un ZjE78HrMbrjI4vF31Qtmj52z7rJ7LNhU6nGl4SSbx/kZCxk9Xk78zebRt2UVo8fPlzoeJ089 YfH4vEkugDuKyyYlNSezLLVI3y6BK6P5YwdTwWmuihVbTzI2MD7h6GLk5JAQMJFYfnwhK4Qt JnHh3no2EFtIYCmjRMPmyi5GDrCaWWftuxi5gMLTGSW+7dvCDuH0MEl8fbSSHaSBTcBM4uCi 1WC2iECCROekU0wgRcwCfxkluhvngm0QFvCX2LZ7IjPIVBYBVYnrqytBwrwCrhJLf51igzhC UaL72QQo+xa7xO8pWSA2i4CAxLfJh1ggDpKV2HSAGaJEUuLgihssExgFFzAyrGIUTS1ILihO Si8y1St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bG Wocp3+NcrL9Pd28/IJPFamGvKxLMwugSqmUrnP0liHNjTfPDzBe2FlHLVy78VbwoQTRi6uI1 e36t9E3z+nz5t0XT8rif5S1KYf/nVfAZnTNOdHs3k/dJ/B/xo1+0/nS8zTUMf7Dy+rIZhzNU IwLil789KZm8eYrUgTXlv6YF//IP7qtWPL5QiaU4I9FQi7moOBEAdHNtKAYDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The exynos5 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 for non Exynos SoCs. This change should save a bunch of cpufreq transitions calls which does not apply to exynos SoCs. Signed-off-by: Naveen Krishna Chatradhi --- 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..d062fa7 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) && !defined(CONFIG_ARCH_EXYNOS) 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) && !defined(CONFIG_ARCH_EXYNOS) #define freq_to_i2c(_n) container_of(_n, struct s3c24xx_i2c, freq_transition)