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

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

Merge "cpufreq: qcom-hw: register with Energy Model framework"

parents 13a1789c 1aa573e9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/pm_opp.h>
#include <linux/energy_model.h>

#define LUT_MAX_ENTRIES			40U
#define CORE_COUNT_VAL(val)		(((val) & (GENMASK(18, 16))) >> 16)
@@ -90,6 +91,7 @@ qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy,

static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
{
	struct em_data_callback em_cb = EM_DATA_CB(of_dev_pm_opp_get_cpu_power);
	struct cpufreq_qcom *c;
	struct device *cpu_dev;
	int ret;
@@ -117,6 +119,8 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
	policy->freq_table = c->table;
	policy->driver_data = c;

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

	return 0;
}