Re: [PATCH v2 09/15] PM / devfreq: Switch to dev_pm_opp_find_freq_{ceil/floor}_indexed() APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23. 7. 24. 14:46, Manivannan Sadhasivam wrote:
> On Mon, Jul 24, 2023 at 05:06:04AM +0900, Chanwoo Choi wrote:
>> Hi,
>>
>> On 23. 7. 20. 14:40, Manivannan Sadhasivam wrote:
>>> Some devfreq consumers like UFS driver need to work with multiple clocks
>>> through the OPP framework. For this reason, OPP framework exposes the
>>> _indexed() APIs for finding the floor/ceil of the supplied frequency of
>>> the indexed clock. So let's use them in the devfreq driver.
>>>
>>> Currently, the clock index of 0 is used which works fine for multiple as
>>> well as single clock.
>>>
>>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
>>> ---
>>>  drivers/devfreq/devfreq.c | 14 +++++++-------
>>>  1 file changed, 7 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
>>> index e36cbb920ec8..7686993d639f 100644
>>> --- a/drivers/devfreq/devfreq.c
>>> +++ b/drivers/devfreq/devfreq.c
>>> @@ -88,7 +88,7 @@ static unsigned long find_available_min_freq(struct devfreq *devfreq)
>>>  	struct dev_pm_opp *opp;
>>>  	unsigned long min_freq = 0;
>>>  
>>> -	opp = dev_pm_opp_find_freq_ceil(devfreq->dev.parent, &min_freq);
>>> +	opp = dev_pm_opp_find_freq_ceil_indexed(devfreq->dev.parent, &min_freq, 0);
>>
>> This patch changed the used function from dev_pm_opp_find_freq_ceil
>> to dev_pm_opp_find_freq_ceil_indexed even if there are no supporting of the multiple clocks
>> and then dev_pm_opp_find_freq_ceil is not removed from OPP.
>>
>> I think that it is better to use dev_pm_opp_find_freq_ceil_indexed
>> when need to support multiple clocks with real case.
>>
> 
> There is the user for dev_pm_opp_find_freq_ceil_indexed() which is the UFS
> driver and since UFS is using devfreq, we need this change. I've added this info
> in the commit message as well. What am I missing?


I found out the difference of them. 
- dev_pm_opp_find_freq_ceil() used the 'assert_single_clk' which check the count of clock.
                                                               

(snip)

Acked-by: Chanwoo Choi <cw00.choi@xxxxxxxxxxx>

-- 
Best Regards,
Samsung Electronics
Chanwoo Choi




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux