[openwrt/openwrt] ipq806x: add missing scaling_available_frequencies for dedicated cpufreq

LEDE Commits lede-commits at lists.infradead.org
Mon Aug 22 03:48:32 PDT 2022


ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d6994c53cd0e5334478d2aab424674da438804e2

commit d6994c53cd0e5334478d2aab424674da438804e2
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sun Aug 21 18:52:52 2022 +0200

    ipq806x: add missing scaling_available_frequencies for dedicated cpufreq
    
    Add missing scaling_available_frequencies sysfs entry for dedicated
    cpufreq driver.
    This sysfs entry is not standard and each cpufreq driver needs to
    provide it and declare it in the cpufreq driver struct attr.
    
    Fixes: 5dbbefcbccc0 ("ipq806x: introduce dedicated krait cpufreq")
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch        | 8 +++++++-
 .../098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch        | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/target/linux/ipq806x/patches-5.10/098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch b/target/linux/ipq806x/patches-5.10/098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch
index 769686220b..d3677253f6 100644
--- a/target/linux/ipq806x/patches-5.10/098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch
+++ b/target/linux/ipq806x/patches-5.10/098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch
@@ -75,7 +75,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  ##################################################################################
 --- /dev/null
 +++ b/drivers/cpufreq/qcom-cpufreq-krait.c
-@@ -0,0 +1,603 @@
+@@ -0,0 +1,609 @@
 +// SPDX-License-Identifier: GPL-2.0
 +
 +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -435,6 +435,11 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 +	return 0;
 +}
 +
++static struct freq_attr *krait_cpufreq_attr[] = {
++	&cpufreq_freq_attr_scaling_available_freqs,
++	NULL,
++};
++
 +static struct cpufreq_driver krait_cpufreq_driver = {
 +	.flags = CPUFREQ_STICKY | CPUFREQ_NEED_INITIAL_FREQ_CHECK |
 +		 CPUFREQ_IS_COOLING_DEV,
@@ -446,6 +451,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 +	.online = cpufreq_online,
 +	.offline = cpufreq_offline,
 +	.name = "krait-cpufreq",
++	.attr = krait_cpufreq_attr,
 +	.suspend = cpufreq_generic_suspend,
 +};
 +
diff --git a/target/linux/ipq806x/patches-5.15/098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch b/target/linux/ipq806x/patches-5.15/098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch
index c0356ec9b9..a3896f2fc2 100644
--- a/target/linux/ipq806x/patches-5.15/098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch
+++ b/target/linux/ipq806x/patches-5.15/098-1-cpufreq-add-Krait-dedicated-scaling-driver.patch
@@ -75,7 +75,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  ##################################################################################
 --- /dev/null
 +++ b/drivers/cpufreq/qcom-cpufreq-krait.c
-@@ -0,0 +1,629 @@
+@@ -0,0 +1,635 @@
 +// SPDX-License-Identifier: GPL-2.0
 +
 +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -448,6 +448,11 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 +	return 0;
 +}
 +
++static struct freq_attr *krait_cpufreq_attr[] = {
++	&cpufreq_freq_attr_scaling_available_freqs,
++	NULL,
++};
++
 +static struct cpufreq_driver krait_cpufreq_driver = {
 +	.flags = CPUFREQ_NEED_INITIAL_FREQ_CHECK |
 +		 CPUFREQ_IS_COOLING_DEV,
@@ -459,6 +464,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 +	.online = cpufreq_online,
 +	.offline = cpufreq_offline,
 +	.name = "krait-cpufreq",
++	.attr = krait_cpufreq_attr,
 +	.suspend = cpufreq_generic_suspend,
 +};
 +




More information about the lede-commits mailing list