From: Christoph Niedermaier <cniedermaier@dh-electronics.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Shawn Guo <shawnguo@kernel.org>, Marek Vasut <marex@denx.de>,
Fabio Estevam <festevam@denx.de>,
NXP Linux Team <linux-imx@nxp.com>,
"open list:CPU FREQUENCY SCALING FRAMEWORK"
<linux-pm@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] cpufreq: imx6q: Disable only available frequencies
Date: Thu, 11 May 2023 14:38:42 +0000 [thread overview]
Message-ID: <a7bfc85a9b664daf84e90adf520c0a56@dh-electronics.com> (raw)
In-Reply-To: <20230511095355.5t7ldsyg5eglrrtv@vireshk-i7>
From: Viresh Kumar [mailto:viresh.kumar@linaro.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
next prev parent reply other threads:[~2023-05-11 14:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 9:23 [PATCH] cpufreq: imx6q: Disable only available frequencies Christoph Niedermaier
2023-05-11 9:51 ` Viresh Kumar
2023-05-11 9:53 ` Viresh Kumar
2023-05-11 14:38 ` Christoph Niedermaier [this message]
2023-05-12 4:41 ` Viresh Kumar
2023-05-11 19:25 ` Marek Vasut
2023-05-11 20:51 ` Christoph Niedermaier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a7bfc85a9b664daf84e90adf520c0a56@dh-electronics.com \
--to=cniedermaier@dh-electronics.com \
--cc=festevam@denx.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=marex@denx.de \
--cc=rafael@kernel.org \
--cc=shawnguo@kernel.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox