Re: [PATCH 00/11] thermal: add new flag irq-mode for trip point

From: Lukasz Luba
Date: Wed Oct 17 2018 - 04:24:08 EST

On 10/17/2018 09:52 AM, Krzysztof Kozlowski wrote:
> On Wed, 17 Oct 2018 at 09:42, Lukasz Luba <l.luba@xxxxxxxxxxxxxxxxxxx> wrote:
>> Hi Krzysztof,
>> On 10/17/2018 09:03 AM, Krzysztof KozÅowski wrote:
>>> On Tue, 16 Oct 2018 at 16:56, Lukasz Luba <l.luba@xxxxxxxxxxxxxxxxxxx> wrote:
>>>> Hi all,
>>>> This patch set adds new flag and mechanism in thermal trip point in DT.
>>>> The current situation with 'passive' (passive cooling - DVFS)
>>>> trip point is that it enables polling mode in thermal framework.
>>> For DT platform, I checked it some months ago... and that time I was
>>> pretty sure - passive mode does not enable polling (unless you tell it
>>> explicitly with "polling-delay-passive"). Maybe something changed...
>>> but quick look at the code tell me that not. Passive does not indicate
>>> polling mode.
>>> Why do you think that passive enables polling?
>> Please check dt file which implements 2 more trip points that HW
>> supports:
>> arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
>> In that file we have this trick with 'active' present.
>> Yes, you are right, 'polling-delay-passive' enables it in
>> the thermal code (for whole thermal zone).
>> Unfortunately, if you change the bellow 'active' to 'passive'
>> in that file, they will start polling, which is not what we want.
> Yes but this looks different than what you explained at the beginning.
> You said that passive enables polling mode... which is not true. You
> can have active with or without polling. You can have passive with or
> without polling. But the real problem you described now is that given
> polling/IRQ mode applies to entire thermal zone, not to a specific
> trip point.
> I agree with this problem but you need to clearly mark it in cover
> letter and description of other commits because really from existing
> explanation I understood something completely different. You simply
> want to configure IRQ or polling per trip-point, not per thermal zone.
Thank you for your feedback, I will rewrite the cover letter and
I will add that the thermal zone polling settings are for all it's trip
points, which has some implications. Therefore, trying to work around,
might cause confusion due to misalignment with trip point documentation
and old assumptions.


> Best regards,
> Krzysztof