Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 768aa8c4 authored by Dietmar Eggemann's avatar Dietmar Eggemann Committed by Chris Redpath
Browse files

ANDROID: cpufreq: dt: invoke frequency-invariance setter function



Call the frequency-invariance setter function arch_set_freq_scale()
if the new frequency has been successfully set which is indicated by
dev_pm_opp_set_rate() returning 0.

Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
Change-Id: I00dce40c8def07e87bce7bc556ffc3a8693af038
Signed-off-by: default avatarChris Redpath <chris.redpath@arm.com>
parent c99e720a
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -43,9 +43,17 @@ static struct freq_attr *cpufreq_dt_attr[] = {
static int set_target(struct cpufreq_policy *policy, unsigned int index)
{
	struct private_data *priv = policy->driver_data;
	unsigned long freq = policy->freq_table[index].frequency;
	int ret;

	ret = dev_pm_opp_set_rate(priv->cpu_dev, freq * 1000);

	return dev_pm_opp_set_rate(priv->cpu_dev,
				   policy->freq_table[index].frequency * 1000);
	if (!ret) {
		arch_set_freq_scale(policy->related_cpus, freq,
				    policy->cpuinfo.max_freq);
	}

	return ret;
}

/*