Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754133AbbHFNnU (ORCPT ); Thu, 6 Aug 2015 09:43:20 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:60466 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753668AbbHFNnQ (ORCPT ); Thu, 6 Aug 2015 09:43:16 -0400 X-AuditID: cbfee61a-f79a06d000005c6f-7e-55c36472125a 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, Javier Martinez Canillas Subject: [PATCH v4 1/6] cpufreq: make scaling_boost_freqs sysfs attr available when boost is enabled Date: Thu, 06 Aug 2015 15:41:49 +0200 Message-id: <1438868514-8814-2-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1438868514-8814-1-git-send-email-b.zolnierkie@samsung.com> References: <1438868514-8814-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNLMWRmVeSWpSXmKPExsVy+t9jQd2ilMOhBp8fK1psnLGe1eL6l+es Fv8fvWa1uPZ7BpvFm7drmCxevzC06F1wlc2i//FrZouvh1cwWrx5uJnRYtPja6wWH3vusVpc 3jWHzeJz7xFGixnn9zFZrNt4i93i4ilXi8Nv2lktOpYxWrSt/sBqsWrXH0aLjV89HMQ83t9o Zff4O7uV2WPnrLvsHptWdbJ53Lm2h81j85J6j3/H2D229AOF+7asYvTYfm0es8fnTXIB3FFc NimpOZllqUX6dglcGZ+mnWYseCZS8XH6JNYGxi+CXYycHBICJhLX9/WwQdhiEhfurQeyuTiE BGYxShycMZMFwvnFKHGlfSUzSBWbgJXExPZVjCAJEYEVTBLTn+xjB3GYBXawSHw5f5m1i5GD Q1ggTWLuRhuQBhYBVYmna26wgti8Au4Sh7edZYdYJydx8thksDingIfEzG/nwOJCQDUH7x1g nMDIu4CRYRWjRGpBckFxUnquYV5quV5xYm5xaV66XnJ+7iZGcJQ8k9rBeHCX+yFGAQ5GJR7e B2sOhQqxJpYVV+YeYpTgYFYS4X2ofzhUiDclsbIqtSg/vqg0J7X4EKM0B4uSOK/shs2hQgLp iSWp2ampBalFMFkmDk6pBsatbjO8hROeRrG/OnnqgZfCw4UCJrN+cb6cq7Ha8JLRuui3sRkG JwLF//Mx8m61eWjltC8qle3+2SLHc/zCb9a9iSg3NjyTxvC02rhXW2NZ7ftD75zvBmeKP9vz vPRecdDWmzvFl0X2Gh+/lWqwObxnzb4Nuinle1h3tk+1O/nY7/rnasEHbXpKLMUZiYZazEXF iQDPFPJEjgIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2836 Lines: 76 Add cpufreq_boost_enabled_generic_attr table and use it in cpufreq-dt driver instead of cpufreq_generic_attr one when boost support is enabled. As a result scaling_boost_freqs sysfs attribute is available when cpufreq-dt driver is used and boost support is enabled. Cc: Viresh Kumar Cc: Thomas Abraham Cc: Javier Martinez Canillas Cc: Krzysztof Kozlowski Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/cpufreq/cpufreq-dt.c | 3 +++ drivers/cpufreq/freq_table.c | 7 +++++++ include/linux/cpufreq.h | 1 + 3 files changed, 11 insertions(+) diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index b9259ab..7b091c0 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -182,6 +182,8 @@ try_again: return ret; } +static struct cpufreq_driver dt_cpufreq_driver; + static int cpufreq_init(struct cpufreq_policy *policy) { struct cpufreq_frequency_table *freq_table; @@ -336,6 +338,7 @@ static int cpufreq_init(struct cpufreq_policy *policy) ret = cpufreq_enable_boost_support(); if (ret) goto out_free_cpufreq_table; + dt_cpufreq_driver.attr = cpufreq_boost_enabled_generic_attr; } policy->cpuinfo.transition_latency = transition_latency; diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c index a8f1daf..5a00a09 100644 --- a/drivers/cpufreq/freq_table.c +++ b/drivers/cpufreq/freq_table.c @@ -300,6 +300,13 @@ struct freq_attr *cpufreq_generic_attr[] = { }; EXPORT_SYMBOL_GPL(cpufreq_generic_attr); +struct freq_attr *cpufreq_boost_enabled_generic_attr[] = { + &cpufreq_freq_attr_scaling_available_freqs, + &cpufreq_freq_attr_scaling_boost_freqs, + NULL, +}; +EXPORT_SYMBOL_GPL(cpufreq_boost_enabled_generic_attr); + int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, struct cpufreq_frequency_table *table) { diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 95f0186..25937ff 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -610,6 +610,7 @@ struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu); /* the following are really really optional */ extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; extern struct freq_attr *cpufreq_generic_attr[]; +extern struct freq_attr *cpufreq_boost_enabled_generic_attr[]; int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, struct cpufreq_frequency_table *table); -- 1.9.1 -- 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/