lkml.org 
[lkml]   [2016]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 11/16] cpufreq: dt: Pass regulator name to the OPP core
On 02/02, Viresh Kumar wrote:
> static int allocate_resources(int cpu, struct device **cdev,
> struct regulator **creg, struct clk **cclk)
> {
> @@ -200,6 +225,7 @@ static int cpufreq_init(struct cpufreq_policy *policy)
> unsigned long min_uV = ~0, max_uV = 0;
> unsigned int transition_latency;
> bool opp_v1 = false;
> + const char *name = NULL;

Is this initialization necessary?

> int ret;
>
> ret = allocate_resources(policy->cpu, &cpu_dev, &cpu_reg, &cpu_clk);
> @@ -229,6 +255,25 @@ static int cpufreq_init(struct cpufreq_policy *policy)
> }
>
> /*
> + * OPP layer will be taking care of regulators now, but it needs to know
> + * the name of the regulator first.
> + */
> + name = find_supply_name(cpu_dev, np);
> + if (IS_ERR(name)) {

This looks to never happen?

> + ret = PTR_ERR(name);
> + goto out_node_put;
> + }
> +
> + if (name) {
> + ret = dev_pm_opp_set_regulator(cpu_dev, name);
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

\
 
 \ /
  Last update: 2016-02-09 00:21    [W:0.068 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site