[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a7bfc85a9b664daf84e90adf520c0a56@dh-electronics.com>
Date: Thu, 11 May 2023 14:38:42 +0000
From: Christoph Niedermaier <cniedermaier@...electronics.com>
To: Viresh Kumar <viresh.kumar@...aro.org>
CC: "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Shawn Guo <shawnguo@...nel.org>, Marek Vasut <marex@...x.de>,
Fabio Estevam <festevam@...x.de>,
NXP Linux Team <linux-imx@....com>,
"open list:CPU FREQUENCY SCALING FRAMEWORK"
<linux-pm@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] cpufreq: imx6q: Disable only available frequencies
From: Viresh Kumar [mailto:viresh.kumar@...aro.org]
Sent: Thursday, May 11, 2023 11:54 AM
> On 11-05-23, 11:23, Christoph Niedermaier wrote:
>> @@ -254,16 +269,16 @@ static int imx6q_opp_check_speed_grading(struct device *dev)
>> val &= 0x3;
>>
>> if (val < OCOTP_CFG3_SPEED_996MHZ)
>> - if (dev_pm_opp_disable(dev, 996000000))
>> + if (disable_freq_if_available(dev, 996000000))
>> dev_warn(dev, "failed to disable 996MHz OPP\n");
>
> Ahh, these warnings.
>
> What about printing the warning only when returned error != -ENODEV ?
> Or just marking them dev_dbg() ?
I have kept to the documentation of opp, but if -ENODEV is possible
I prefer it. My suggestion is to change each "dev_pm_opp_disable" in
this way:
- if (val < OCOTP_CFG3_SPEED_996MHZ)
- if (dev_pm_opp_disable(dev, 996000000))
+ if (val < OCOTP_CFG3_SPEED_996MHZ) {
+ ret_opp = dev_pm_opp_disable(dev, 996000000);
+ if (ret_opp < 0 && ret_opp != -ENODEV)
dev_warn(dev, "failed to disable 996MHz OPP\n");
+ }
If that's OK, I can do a version 2 with it.
Regards
Christoph
Powered by blists - more mailing lists