Re: [PATCH v2 4/4] cpufreq: Use policy->min/max init as QoS request

From: Jie Zhan

Date: Wed May 20 2026 - 04:57:24 EST




On 5/11/2026 9:55 PM, Pierre Gondois wrote:
> Consider policy->min/max being set in the driver .init()
> callback as a QoS request. Impacted driver are:
> - gx-suspmod.c (min)
> - cppc-cpufreq.c (min)
> - longrun.c (min/max)
>
> Update the documentation accordingly.
>
> Signed-off-by: Pierre Gondois <pierre.gondois@xxxxxxx>
> ---
> Documentation/cpu-freq/cpu-drivers.rst | 10 ++++++++--
> drivers/cpufreq/cpufreq.c | 12 ++++++++++--
> 2 files changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/cpu-freq/cpu-drivers.rst b/Documentation/cpu-freq/cpu-drivers.rst
> index c5635ac3de547..ab4f3c0f3a89b 100644
> --- a/Documentation/cpu-freq/cpu-drivers.rst
> +++ b/Documentation/cpu-freq/cpu-drivers.rst
> @@ -114,8 +114,14 @@ Then, the driver must fill in the following values:
> |policy->cur | The current operating frequency of |
> | | this CPU (if appropriate) |
> +-----------------------------------+--------------------------------------+
> -|policy->min, | |
> -|policy->max, | |
> +|policy->min | If set by the driver in ->init(), |
> +| | used as initial minimum frequency |
> +| | QoS request. |
> ++-----------------------------------+--------------------------------------+
> +|policy->max | If set by the driver in ->init(), |
> +| | used as initial maximum frequency |
> +| | QoS request. |
> ++-----------------------------------+--------------------------------------+
Hi Pierre,

Trivial bit: add the general meaning alongside its driver usage at the init
stage, and mention it defaults to cpuinfo_min/max_freq if not set?

I mean something like:
The minimum/maximum scaling frequency. If set by the driver in ->init(),
used as initial minimum/maximum frequency QoS request; otherwise, follow
policy->cpuinfo.min/max_freq.

Thanks,
Jie
> |policy->policy and, if necessary, | |
> |policy->governor | must contain the "default policy" for|
> | | this CPU. A few moments later, |
[ ... ]