Thread (19 messages) 19 messages, 4 authors, 2015-07-01

[PATCH 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

From: Pi-Cheng Chen <hidden>
Date: 2015-06-24 09:09:56
Also in: linux-devicetree, linux-mediatek, linux-pm, lkml

On Wed, Jun 24, 2015 at 4:56 PM, Viresh Kumar [off-list ref] wrote:
On 24-06-15, 16:44, Pi-Cheng Chen wrote:
quoted
One reason to put those initialization and resource allocation in probe is
that it's easier to handle the return value -PROBE_DEFER from clock
and regulator framework when trying to get clocks and regulators
consumed by cpufreq driver.
This is the sequence of events if you move these things to ->init().

- your driver's probe()
  -> cpufreq_register_driver()
    -> init()
      -> clk/reg get, failed, return -EPROBE_DEFER

And the failure here will be propagated to probe(). So, it should
work IMHO.
I will try it.
quoted
The other reason is when the whole system is resuming from suspend,
the other subsystem e.g. i2c on which cpufreq driver depends might not
ready yet during cpufreq driver initialization. In this case, the cpufreq
driver will be blocked when trying to get resources e.g. regulator on i2c
bus, and the whole system will stuck for seconds.
That's something else you must investigate on. This dependency should
be resolved in some other way, I thought DT might have taken care of
such dependencies.
I will check if it could be solved in some other way.
Thanks.

Pi-Cheng
--
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help