From patchwork Thu Jul 9 15:43:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 6756981 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 64609C05AC for ; Thu, 9 Jul 2015 15:46:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 53E47206FC for ; Thu, 9 Jul 2015 15:46:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E1385206B8 for ; Thu, 9 Jul 2015 15:46:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZDE0L-0000dM-Er; Thu, 09 Jul 2015 15:44:53 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZDE0A-0000Jr-MR for linux-arm-kernel@lists.infradead.org; Thu, 09 Jul 2015 15:44:43 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NR802FMD92E8150@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 10 Jul 2015 00:44:38 +0900 (KST) X-AuditID: cbfee61b-f79416d0000014c0-22-559e96e6d779 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 43.D2.05312.6E69E955; Fri, 10 Jul 2015 00:44:38 +0900 (KST) Received: from AMDC1976.DIGITAL.local ([106.120.53.102]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NR800J1C91IAM40@mmp2.samsung.com>; Fri, 10 Jul 2015 00:44:38 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Thomas Abraham , Sylwester Nawrocki , Michael Turquette , Kukjin Kim , Kukjin Kim , Viresh Kumar , Krzysztof Kozlowski Subject: [PATCH v2 3/7] cpufreq-dt: add turbo modes support Date: Thu, 09 Jul 2015 17:43:37 +0200 Message-id: <1436456621-29839-4-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1436456621-29839-1-git-send-email-b.zolnierkie@samsung.com> References: <1436456621-29839-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLLMWRmVeSWpSXmKPExsVy+t9jQd1n0+aFGixuMrPYOGM9q8X1L89Z Lf4/es1qce33DDaL1y8MLXoXXGWz6H/8mtni6+EVjBZvHm5mtNj0+Bqrxceee6wWl3fNYbP4 3HuE0WLG+X1MFus23mK3uHjK1eLwm3ZWi45ljBZtqz+wWqza9YfRYuNXDwdRj/c3Wtk9/s5u ZfbYOesuu8emVZ1sHneu7WHz2Lyk3uPfMXaPvi2rGD22X5vH7PF5k1wAVxSXTUpqTmZZapG+ XQJXxqOvP9kKLvFV9DxuYGtg3MvTxcjJISFgIjHl1mdmCFtM4sK99WxdjFwcQgLTGSWevd3P AuH8YpRoW/cWrIpNwEpiYvsqRpCEiMAKJonpT/axgzjMAq0sEsvfzmQEqRIWsJa4+HcDWAeL gKrE5JZtrF2MHBy8Ah4SP5tUINbJSZw8NhkszCngKfH4bwxIWAio4u/3XywTGHkXMDKsYhRN LUguKE5KzzXSK07MLS7NS9dLzs/dxAiOhGfSOxhXNVgcYhTgYFTi4W3YOTdUiDWxrLgy9xCj BAezkgjv5f55oUK8KYmVValF+fFFpTmpxYcYpTlYlMR5T+b7hAoJpCeWpGanphakFsFkmTg4 pRoYJ8RHWYZqM97LX6Aa7L00ROiSqtJfc3+taQsqnr6VS/y6fmEBg3CGY1RRCFe6Q8QR/TOW PW9rPNZe/WN+fvH0TTNf6otWtB663R7f7S4Slr1VQ/aYofvLmzmVys8rLFevLH0n2zd9ZnaI aaRCYYG5gu0u/8J4hrNhvG8j12ZWNSjsUJxnHKTEUpyRaKjFXFScCADBOn7JgAIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150709_084442_885181_513FF144 X-CRM114-Status: GOOD ( 15.33 ) X-Spam-Score: -7.2 (-------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lukasz Majewski , Kevin Hilman , Heiko Stuebner , Tobias Jakobi , Anand Moon , linux-pm@vger.kernel.org, Tomasz Figa , linux-kernel@vger.kernel.org, Chanwoo Choi , b.zolnierkie@samsung.com, linux-samsung-soc@vger.kernel.org, Javier Martinez Canillas , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Add turbo modes (from opp-v2 bindings) support using existing cpufreq 'boost' mode infrastructure: - add boost_supported field to struct cpufreq_dt_platform_data - set dt_cpufreq_driver.boost_supported in dt_cpufreq_probe() Cc: Tomasz Figa Cc: Michael Turquette Cc: Javier Martinez Canillas Cc: Thomas Abraham Cc: Viresh Kumar Signed-off-by: Bartlomiej Zolnierkiewicz Reviewed-by: Krzysztof Kozlowski --- drivers/cpufreq/cpufreq-dt.c | 7 ++++++- include/linux/cpufreq-dt.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index 60d98fb..9024205 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -408,6 +408,7 @@ static struct cpufreq_driver dt_cpufreq_driver = { static int dt_cpufreq_probe(struct platform_device *pdev) { + struct cpufreq_dt_platform_data *pd; struct device *cpu_dev; struct regulator *cpu_reg; struct clk *cpu_clk; @@ -428,7 +429,11 @@ static int dt_cpufreq_probe(struct platform_device *pdev) if (!IS_ERR(cpu_reg)) regulator_put(cpu_reg); - dt_cpufreq_driver.driver_data = dev_get_platdata(&pdev->dev); + pd = dev_get_platdata(&pdev->dev); + dt_cpufreq_driver.driver_data = pd; + + if (pd) + dt_cpufreq_driver.boost_supported = pd->boost_supported; ret = cpufreq_register_driver(&dt_cpufreq_driver); if (ret) diff --git a/include/linux/cpufreq-dt.h b/include/linux/cpufreq-dt.h index 0414009..483ca1b 100644 --- a/include/linux/cpufreq-dt.h +++ b/include/linux/cpufreq-dt.h @@ -17,6 +17,7 @@ struct cpufreq_dt_platform_data { * clock. */ bool independent_clocks; + bool boost_supported; }; #endif /* __CPUFREQ_DT_H__ */