[PATCH v3] cpufreq: imx6q: Move speed grading check to cpufreq driver

Shawn Guo shawnguo at kernel.org
Thu Oct 12 23:51:42 PDT 2017


On Wed, Oct 04, 2017 at 11:43:28AM +0530, Viresh Kumar wrote:
> On 30-09-17, 12:16, Fabio Estevam wrote:
> > From: Fabio Estevam <fabio.estevam at nxp.com>
> > 
> > On some i.MX6 SoCs (like i.MX6SL, i.MX6SX and i.MX6UL) that do not have
> > speed grading check, opp table will not be created in platform code,
> > so cpufreq driver prints the following error message:
> > 
> > cpu cpu0: dev_pm_opp_get_opp_count: OPP table not found (-19)
> > 
> > However, this is not really an error in this case because the
> > imx6q-cpufreq driver first calls dev_pm_opp_get_opp_count()
> > and if it fails, it means that platform code does not provide
> > OPP and then dev_pm_opp_of_add_table() will be called.
> > 
> > In order to avoid such confusing error message, move the speed grading
> > check from platform code to the imx6q-cpufreq driver.
> > 
> > This way the imx6q-cpufreq no longer has to check whether OPP table
> > is supplied by platform code.
> > 
> > Tested on a i.MX6Q and i.MX6UL based boards.
> > 
> > Signed-off-by: Fabio Estevam <fabio.estevam at nxp.com>
> > ---
> > Previous discussion on this topic:
> > https://patchwork.kernel.org/patch/9295059/
> > 
> > Changes since v2:
> > - Fixed a typo in the commit log (missed SL) - Otavio
> > - Remove __init anotation from imx6q_opp_check_speed_grading()
> > Changes since v1:
> > - Remove unneeded has_speed_grading() function.
> 
> Looks fine to me.
> 
> @Shawn: Can you please let us know if you are fine with it?

Acked-by: Shawn Guo <shawnguo at kernel.org>



More information about the linux-arm-kernel mailing list