Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1329669

Re: [PATCH V2 11/16] cpufreq: dt: Pass regulator name to the OPP core

From Stephen Boyd <sboyd@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH V2 11/16] cpufreq: dt: Pass regulator name to the OPP core
Date 2016-02-09 00:00 +0100
Message-ID <r02WL-3dj-17@gated-at.bofh.it> (permalink)
References <qVQ7M-FX-5@gated-at.bofh.it> <qVQ7N-FX-31@gated-at.bofh.it> <qXz2P-3Wf-55@gated-at.bofh.it> <qXCtI-6Fa-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 11/16] cpufreq: dt: Pass regulator name to the OPP core Viresh Kumar <viresh.kumar@linaro.org> - 2016-01-28 09:30 +0100
  Re: [PATCH V2 11/16] cpufreq: dt: Pass regulator name to the OPP core Stephen Boyd <sboyd@codeaurora.org> - 2016-02-02 03:40 +0100
    Re: [PATCH V2 11/16] cpufreq: dt: Pass regulator name to the OPP core Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-02 07:20 +0100
      Re: [PATCH V2 11/16] cpufreq: dt: Pass regulator name to the OPP core Stephen Boyd <sboyd@codeaurora.org> - 2016-02-09 00:00 +0100
        Re: [PATCH V2 11/16] cpufreq: dt: Pass regulator name to the OPP core Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-09 05:20 +0100

csiph-web