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

Commit c6217dd5 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpufreq: qcom-hw: Notify the current frequency to the topology driver"

parents 9943236a 4edf4245
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 */

#include <linux/cpufreq.h>
@@ -51,6 +51,9 @@ qcom_cpufreq_hw_target_index(struct cpufreq_policy *policy,
	struct cpufreq_qcom *c = policy->driver_data;

	writel_relaxed(index, c->reg_bases[REG_PERF_STATE]);
	arch_set_freq_scale(policy->related_cpus,
			    policy->freq_table[index].frequency,
			    policy->cpuinfo.max_freq);

	return 0;
}
@@ -118,6 +121,7 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
	policy->fast_switch_possible = true;
	policy->freq_table = c->table;
	policy->driver_data = c;
	policy->dvfs_possible_from_any_cpu = true;

	em_register_perf_domain(policy->cpus, ret, &em_cb);