Skip to content

Commit ad3ce38

Browse files
finley1226wzyy2
authored andcommitted
cpufreq: dt: change frequency to a specific value when cpufreq exits
Sometimes all cpus of big cluster are closed and its frequency keep a high value, in order to reduce power and reset normally, set frequency to a specific value after close all the cpus. Change-Id: I88bce25812d1b0ff3f78a898cb161642a65cc523 Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
1 parent 89bd81b commit ad3ce38

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/cpufreq/cpufreq-dt.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,12 @@ static int cpufreq_exit(struct cpufreq_policy *policy)
318318
struct cpumask cpus;
319319
struct private_data *priv = policy->driver_data;
320320

321+
#ifdef CONFIG_ARCH_ROCKCHIP
322+
cpumask_set_cpu(policy->cpu, policy->cpus);
323+
if (cpufreq_generic_suspend(policy))
324+
pr_err("%s: Failed to suspend driver: %p\n", __func__, policy);
325+
cpumask_clear_cpu(policy->cpu, policy->cpus);
326+
#endif
321327
priv->cpu_dev = get_cpu_device(policy->cpu);
322328
cpufreq_cooling_unregister(priv->cdev);
323329
dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &policy->freq_table);

0 commit comments

Comments
 (0)