Re: [PATCH 1/3] cpufreq: Add a callback to update the min_freq_req from drivers
From: Dhananjay Ugwekar
Date: Thu Oct 10 2024 - 05:55:13 EST
Hello Viresh,
On 10/10/2024 1:05 PM, Viresh Kumar wrote:
> On 03-10-24, 08:39, Dhananjay Ugwekar wrote:
>> diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
>> index e0e19d9c1323..b20488b55f6c 100644
>> --- a/include/linux/cpufreq.h
>> +++ b/include/linux/cpufreq.h
>> @@ -414,6 +414,12 @@ struct cpufreq_driver {
>> * policy is properly initialized, but before the governor is started.
>> */
>> void (*register_em)(struct cpufreq_policy *policy);
>> +
>> + /*
>> + * Set by drivers that want to initialize the policy->min_freq_req with
>> + * a value different from the default value (0) in cpufreq core.
>> + */
>> + int (*get_init_min_freq)(struct cpufreq_policy *policy);
>> };
>
> Apart from Rafael's concern, I don't see why you need to define a callback for
> something this basic. If we are going to make this change, why can't we just add
> another u64 field in policy's structure which gives you the freq directly ?
Sure, that also works for us, if it is okay with you and Rafael, I can add the
u64 field in policy struct.
Thanks,
Dhananjay
>