qcom-cpufreq: Removing lmh-dcvs parsing in ready callback

LMH DCVS is no more registering cpufreq cooling device. cpufreq
has to register cpufreq cooling device for each policy by default.

Remove LMH DCVS node check before cpufreq cooling register in
cpufreq ready callback.

Change-Id: I4476aac3c5aecfd438b0671eb0a9ab8ad535eebb
Signed-off-by: Asha Magadi Venkateshamurthy <amagad@codeaurora.org>
This commit is contained in:
Asha Magadi Venkateshamurthy
2020-11-15 19:09:38 +05:30
parent ba87aa9b05
commit 8e71da71cc

View File

@@ -4,7 +4,7 @@
* MSM architecture cpufreq driver * MSM architecture cpufreq driver
* *
* Copyright (C) 2007 Google, Inc. * Copyright (C) 2007 Google, Inc.
* Copyright (c) 2007-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2007-2020, The Linux Foundation. All rights reserved.
* Author: Mike A. Chan <mikechan@google.com> * Author: Mike A. Chan <mikechan@google.com>
* *
*/ */
@@ -304,7 +304,7 @@ static struct freq_attr *msm_freq_attr[] = {
static void msm_cpufreq_ready(struct cpufreq_policy *policy) static void msm_cpufreq_ready(struct cpufreq_policy *policy)
{ {
struct device_node *np, *lmh_node; struct device_node *np;
unsigned int cpu = policy->cpu; unsigned int cpu = policy->cpu;
if (cdev[cpu]) if (cdev[cpu])
@@ -319,21 +319,13 @@ static void msm_cpufreq_ready(struct cpufreq_policy *policy)
* thermal DT code takes care of matching them. * thermal DT code takes care of matching them.
*/ */
if (of_find_property(np, "#cooling-cells", NULL)) { if (of_find_property(np, "#cooling-cells", NULL)) {
lmh_node = of_parse_phandle(np, "qcom,lmh-dcvs", 0); cdev[cpu] = cpufreq_platform_cooling_register(policy, NULL);
if (lmh_node) {
of_node_put(lmh_node);
goto ready_exit;
}
cdev[cpu] = of_cpufreq_cooling_register(policy);
if (IS_ERR(cdev[cpu])) { if (IS_ERR(cdev[cpu])) {
pr_err("running cpufreq for CPU%d without cooling dev: %ld\n", pr_err("running cpufreq for CPU%d without cooling dev: %ld\n",
cpu, PTR_ERR(cdev[cpu])); cpu, PTR_ERR(cdev[cpu]));
cdev[cpu] = NULL; cdev[cpu] = NULL;
} }
} }
ready_exit:
of_node_put(np); of_node_put(np);
} }