Re: [PATCH V8 2/8] cpufreq: mediatek: Enable clock and regulator

From
Viresh Kumar <viresh.kumar@linaro.org>
Date
2021-03-30 04:37:39
Also in
linux-arm-kernel, linux-devicetree, linux-pm, lkml
Reply to
Andrew-sh.Cheng, 2021-03-23
On 23-03-21, 19:33, Andrew-sh.Cheng wrote:
quoted hunk ↗ jump to hunk
From: "Andrew-sh.Cheng" <redacted>

Need to enable regulator,
so that the max/min requested value will be recorded
even it is not applied right away.

Intermediate clock is not always enabled by ccf in different projects,
so cpufreq should enable it by itself.

Signed-off-by: Andrew-sh.Cheng <redacted>
---
 drivers/cpufreq/mediatek-cpufreq.c | 33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)
diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
index f2e491b25b07..432368707ea6 100644
--- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c
@@ -350,6 +350,11 @@ static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_info *info, int cpu)
 		ret = PTR_ERR(proc_reg);
 		goto out_free_resources;
 	}
+	ret = regulator_enable(proc_reg);
+	if (ret) {
+		pr_warn("enable vproc for cpu%d fail\n", cpu);
+		goto out_free_resources;
+	}
Regulators are enabled by OPP core as well now, you sure this is
required ?

-- 
viresh

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Thread (30 messages) 30 messages, 4 authors, last reply 2021-05-31
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help