From mboxrd@z Thu Jan 1 00:00:00 1970 From: shawnguo@kernel.org (Shawn Guo) Date: Fri, 13 Oct 2017 14:51:42 +0800 Subject: [PATCH v3] cpufreq: imx6q: Move speed grading check to cpufreq driver In-Reply-To: <20171004061328.GC8478@vireshk-i7> References: <1506784606-2064-1-git-send-email-festevam@gmail.com> <20171004061328.GC8478@vireshk-i7> Message-ID: <20171013065141.GI8833@dragon> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 > > > > 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 > > --- > > 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