On 11-01-16, 18:20, Stephen Boyd wrote:
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.
cpufreq driver's ->init() callback doesn't return the error value properly to the probe() function, and so it was done this way in the first place. The problem is in subsys framework. I tried to fix it but it was rejected and we need to fix it some other way:
http://marc.info/?l=linux-kernel&m=143530948918819&w=2
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?
Okay, will do.