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: 6756871 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 340359F380 for ; Thu, 9 Jul 2015 15:45:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5CD7F20713 for ; Thu, 9 Jul 2015 15:45:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0462E206C5 for ; Thu, 9 Jul 2015 15:45:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753269AbbGIPoq (ORCPT ); Thu, 9 Jul 2015 11:44:46 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:54728 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753035AbbGIPok (ORCPT ); Thu, 9 Jul 2015 11:44:40 -0400 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>; 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 Cc: Tomasz Figa , Lukasz Majewski , Heiko Stuebner , Chanwoo Choi , Kevin Hilman , Javier Martinez Canillas , Tobias Jakobi , Anand Moon , linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, b.zolnierkie@samsung.com 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== 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.2 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 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__ */