RE: [PATCH 1/1] cpufreq: cpufreq-cpu0: use the max voltage insteadof voltage-tolerance

From: Rongjun Ying
Date: Wed Nov 06 2013 - 20:55:42 EST




> -----Original Message-----
> From: Shawn Guo [mailto:shawn.guo@xxxxxxxxxx]
> Sent: Wednesday, November 06, 2013 11:28 AM
> To: Rongjun Ying
> Cc: Viresh Kumar; rjying; Rafael J. Wysocki; cpufreq@xxxxxxxxxxxxxxx;
> linux-pm@xxxxxxxxxxxxxxx; Linux Kernel Mailing List;
> rongjun.ying@xxxxxxxx
> Subject: Re: [PATCH 1/1] cpufreq: cpufreq-cpu0: use the max voltage
> instead of voltage-tolerance
>
> On Wed, Nov 06, 2013 at 02:15:07AM +0000, Rongjun Ying wrote:
> > If omit voltage-tolerance, sometimes also can't get appropriate
> voltages.
> > For example:
> > If the regulator IC only can supply min voltage is 1.000V and max
> voltage is 1.200V, and cpu work max voltage is 1.200V.
> > But the cpu just need 1.100V when cpu run under a freq.
> > So regulator_set_voltage_tol will return failed.
> > Because the regulator_set_voltage will invoke with min-uV is 1100000
> and max-uV is 1100000 parameters.
> > Regulator can't supply it.
> > As this case, the regulator just need supply 1.200V.
>
> For given board, what voltages could be provided is known. So you can
> just define OPP table in <board>.dts and specify the voltage as the
> value that the regulator IC can supply, e.g. 1.200V in above example.
>
> This is not nice, as OPP table is CPU/SoC specific and should be
> ideally defined in <soc>.dtsi. But still it's a way out for you to use
> cpufreq-cpu0 driver as it is.
>
> In any case, you can not just change voltage-tolerance to voltage-max
> with no care about the existing users.
>
> Shawn
>
I don't think so. The voltage/freq pairs are attribute of the CPU.
Any boards can choose regulator IC base the cost and other reasons.
If the opp table defined in <board>.dts, we can set exact voltage/freq pairs,
and not need use the voltage-tolerance to set tolerance.

Thanks
-RongJun Ying
>
>
> To report this email as spam click
> https://www.mailcontrol.com/sr/MZbqvYs5QwJvpeaetUwhCQ==
> ch0RRg48Kxe8iwle4qrOOz8w5o+DwGNVtWag1M3YVHc55g== .


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/