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

Commit 70ac9faa authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "qcom-cpufreq: Implement resolve_freq method"

parents 7c094d73 6feced59
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -100,6 +100,16 @@ static int msm_cpufreq_target(struct cpufreq_policy *policy,
	return ret;
}

static unsigned int msm_cpufreq_resolve_freq(struct cpufreq_policy *policy,
					     unsigned int target_freq)
{
	int index;

	index = cpufreq_frequency_table_target(policy, target_freq,
					       CPUFREQ_RELATION_L);
	return policy->freq_table[index].frequency;
}

static int msm_cpufreq_verify(struct cpufreq_policy *policy)
{
	cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
@@ -284,6 +294,7 @@ static struct cpufreq_driver msm_cpufreq_driver = {
	.init		= msm_cpufreq_init,
	.verify		= msm_cpufreq_verify,
	.target		= msm_cpufreq_target,
	.resolve_freq	= msm_cpufreq_resolve_freq,
	.get		= msm_cpufreq_get_freq,
	.name		= "msm",
	.attr		= msm_freq_attr,