On 07/03/2021 15:16, Chanwoo Choi wrote:
> On 21. 3. 7. 오후 6:45, Daniel Lezcano wrote:
>> Currently the default behavior is to manually having the devfreq
>> backend to register themselves as a devfreq cooling device.
>>
>> Instead of adding the code in the drivers for the thermal cooling
>> device registering, let's provide a flag in the devfreq's profile to
>> tell the common devfreq code to register the newly created devfreq as
>> a cooling device.
>>
>> Suggested-by: Chanwoo Choi <[email protected]>
>> Signed-off-by: Daniel Lezcano <[email protected]>
>> ---
>>   V3:
>>     - Rebased on linux-pm branch without units.h
>>     - Set the cdev to NULL in case of error
>>     - Added description for the cdev field in the devfreq structure
>>   V2:
>>     - Added is_cooling_device boolean in profile structure
>>     - Register cooling device when the is_cooling_device boolean is set
>>     - Remove devfreq cooling device registration in the backend drivers
>>   V1:
>>     - Register devfreq as a cooling device unconditionnally
>> ---


[ ... ]

>>       return devfreq;
>>
>>   err_init:
>> @@ -960,6 +971,8 @@ int devfreq_remove_device(struct devfreq *devfreq)
>>       if (!devfreq)
>>               return -EINVAL;
>>
>> +     thermal_cooling_device_unregister(devfreq->cdev);
> 
> I have a question. Why don't you use devfreq_cooling_unregister()?
> When thermal_cooling_device_unregister(), how can we remove
> the pm_qos_request of devfreq device?

You are perfectly right. I failed to call the right function :/

Will fix it with a v4.

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Reply via email to