Thread (68 messages) 68 messages, 4 authors, 2016-01-25

Re: [PATCH 17/17] cpufreq: dt: No need to allocate resources anymore

From: Stephen Boyd <hidden>
Date: 2016-01-12 02:20:24

On 12/22, Viresh Kumar wrote:
OPP layer manages it now and cpufreq-dt driver doesn't need it. But, we
still need to check for availability of resources for deferred probing.
Why? It seems cleaner to let OPP layer return an error indicating
probe defer or failure when we try to initialize it. That way we
aren't duplicating the same logic in two places to figure out if
a regulator or clock is ready.
quoted hunk ↗ jump to hunk
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
@@ -95,8 +90,8 @@ static int allocate_resources(int cpu, struct device **cdev,
 		 * not yet registered, we should try defering probe.
 		 */
 		if (PTR_ERR(cpu_reg) == -EPROBE_DEFER) {
-			dev_dbg(cpu_dev, "cpu%d regulator not ready, retry\n",
-				cpu);
+			dev_dbg(cpu_dev, "cpu%s regulator not ready, retry\n",
Should that just be "%s regulator not ready"?
quoted hunk ↗ jump to hunk
+				reg);
 			return -EPROBE_DEFER;
 		}
@@ -241,9 +234,7 @@ static int cpufreq_init(struct cpufreq_policy *policy)
 	}
 
 	priv->cpu_dev = cpu_dev;
-	priv->cpu_reg = cpu_reg;
 	policy->driver_data = priv;
-
 	policy->clk = cpu_clk;
Maybe we can have an dev_pm_opp_get_rate() API and a
cpufreq_generic_opp_get() so we can get rid of policy->clk usage
in this driver?
 
 	rcu_read_lock();
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help