Lines Matching refs:policy
42 static int qcom_cpufreq_set_bw(struct cpufreq_policy *policy, in qcom_cpufreq_set_bw() argument
50 dev = get_cpu_device(policy->cpu); in qcom_cpufreq_set_bw()
83 static int qcom_cpufreq_hw_target_index(struct cpufreq_policy *policy, in qcom_cpufreq_hw_target_index() argument
86 struct qcom_cpufreq_data *data = policy->driver_data; in qcom_cpufreq_hw_target_index()
88 unsigned long freq = policy->freq_table[index].frequency; in qcom_cpufreq_hw_target_index()
93 qcom_cpufreq_set_bw(policy, freq); in qcom_cpufreq_hw_target_index()
102 struct cpufreq_policy *policy; in qcom_cpufreq_hw_get() local
105 policy = cpufreq_cpu_get_raw(cpu); in qcom_cpufreq_hw_get()
106 if (!policy) in qcom_cpufreq_hw_get()
109 data = policy->driver_data; in qcom_cpufreq_hw_get()
115 return policy->freq_table[index].frequency; in qcom_cpufreq_hw_get()
118 static unsigned int qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy, in qcom_cpufreq_hw_fast_switch() argument
121 struct qcom_cpufreq_data *data = policy->driver_data; in qcom_cpufreq_hw_fast_switch()
125 index = policy->cached_resolved_idx; in qcom_cpufreq_hw_fast_switch()
128 return policy->freq_table[index].frequency; in qcom_cpufreq_hw_fast_switch()
132 struct cpufreq_policy *policy) in qcom_cpufreq_hw_read_lut() argument
140 struct qcom_cpufreq_data *drv_data = policy->driver_data; in qcom_cpufreq_hw_read_lut()
163 policy->fast_switch_possible = true; in qcom_cpufreq_hw_read_lut()
225 policy->freq_table = table; in qcom_cpufreq_hw_read_lut()
226 dev_pm_opp_set_sharing_cpus(cpu_dev, policy->cpus); in qcom_cpufreq_hw_read_lut()
277 static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) in qcom_cpufreq_hw_cpu_init() argument
289 cpu_dev = get_cpu_device(policy->cpu); in qcom_cpufreq_hw_cpu_init()
292 policy->cpu); in qcom_cpufreq_hw_cpu_init()
296 cpu_np = of_cpu_device_node_get(policy->cpu); in qcom_cpufreq_hw_cpu_init()
343 qcom_get_related_cpus(index, policy->cpus); in qcom_cpufreq_hw_cpu_init()
344 if (!cpumask_weight(policy->cpus)) { in qcom_cpufreq_hw_cpu_init()
350 policy->driver_data = data; in qcom_cpufreq_hw_cpu_init()
352 ret = qcom_cpufreq_hw_read_lut(cpu_dev, policy); in qcom_cpufreq_hw_cpu_init()
365 dev_pm_opp_of_register_em(cpu_dev, policy->cpus); in qcom_cpufreq_hw_cpu_init()
377 static int qcom_cpufreq_hw_cpu_exit(struct cpufreq_policy *policy) in qcom_cpufreq_hw_cpu_exit() argument
379 struct device *cpu_dev = get_cpu_device(policy->cpu); in qcom_cpufreq_hw_cpu_exit()
380 struct qcom_cpufreq_data *data = policy->driver_data; in qcom_cpufreq_hw_cpu_exit()
385 dev_pm_opp_of_cpumask_remove_table(policy->related_cpus); in qcom_cpufreq_hw_cpu_exit()
386 kfree(policy->freq_table); in qcom_cpufreq_hw_cpu_exit()