Re: [PATCH] thermal: imx: fix for dependency on cpu-freq

From: Daniel Lezcano
Date: Tue Nov 20 2018 - 03:54:35 EST


On 20/11/2018 09:47, Anson Huang wrote:
> Hi, Daniel
>
> Best Regards!
> Anson Huang
>
>> -----Original Message-----
>> From: Daniel Lezcano [mailto:daniel.lezcano@xxxxxxxxxx]
>> Sent: 2018å11æ20æ 16:45
>> To: Anson Huang <anson.huang@xxxxxxx>; rui.zhang@xxxxxxxxx;
>> edubezval@xxxxxxxxx; linux-pm@xxxxxxxxxxxxxxx;
>> linux-kernel@xxxxxxxxxxxxxxx
>> Cc: dl-linux-imx <linux-imx@xxxxxxx>
>> Subject: Re: [PATCH] thermal: imx: fix for dependency on cpu-freq
>>
>> On 24/10/2018 08:39, Anson Huang wrote:
>>> The thermal driver is a standalone driver for monitoring SoC
>>> temperature by enabling thermal sensor, so it can be enabled even when
>>> CONFIG_CPU_FREQ is NOT set. So remove the dependency with
>> CPU_THERMAL.
>>>
>>> Add CONFIG_CPU_FREQ check for cpu-freq related operation in thermal
>>> driver to make thermal driver probe successfully when CONFIG_CPU_FREQ
>>> is NOT set.
>>>
>>> Signed-off-by: Anson Huang <Anson.Huang@xxxxxxx>
>>> ---
>>
>> Why not simply kill this legacy code ?
>
> Because killing legacy code will have old dtb compatible issue, old dtb
> will NOT have cpufreq cooling function.

Yeah, I imagine that is the reason why you want to keep the legacy code
but do you really care about old DTB based boards? Are they still
updated with newer *upstream vanilla* kernels?


--
<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