linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Cc: linux-pm@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] thermal: rcar_gen3_thermal: Do not use interrupts for normal operation
Date: Mon, 30 Nov 2020 13:03:48 +0100	[thread overview]
Message-ID: <96a5db0a-a01d-f103-6b95-d645506cc711@linaro.org> (raw)
In-Reply-To: <20201130114917.GE3323880@oden.dyn.berto.se>

On 30/11/2020 12:49, Niklas Söderlund wrote:
> Hi Daniel,
> 
> Thanks for your comments.
> 
> On 2020-11-30 09:15:00 +0100, Daniel Lezcano wrote:
>> On 26/11/2020 23:09, Niklas Söderlund wrote:
>>> Remove the usage of interrupts for the normal temperature operation and
>>> depend on the polling performed by the thermal core. This is done to
>>> prepare to use the interrupts as they are intended to trigger once
>>> specific trip points are passed and not to react to temperature changes
>>> in the normal operational range.
>>
>> I'm not sure to understand the change. Is it not more interesting to
>> have the polling mode disabled for PM reasons and let the interrupt to
>> fire at the first trip point so the mitigation happens then with the
>> polling passive ?
> 
> I agree and this is one of two goals I have with this change, in the 
> long run. The other is to be able support SoC models where the 
> interrupts may not be accessible.
> 
> The change in this patch is to stop using the interrupts to fire as soon 
> as the temp moves +/- 1 degree C, see rcar_gen3_thermal_update_range().  
> When I wrote that code I had misunderstood how things should be done and 
> thought I should use the interrupts as a substitute to the polling done 
> by the core and generate a THERMAL_EVENT_UNSPECIFIED as soon as the temp 
> changed, see rcar_gen3_thermal_irq().
> 
> The way I understand it today is that I should instead setup the 
> interrupts to fire if the temp moves over a trip point, in my case 
> described in DT to allow the system to be informed of this as you 
> describe above.
> 
> In this firs change I'm simply removing my incorrect usage of interrupts 
> that I in future changes will add back in an correct usage pattern while 
> at the same time making interrupts optional to support SoCs where the 
> may not be available.
> 
> Does this make sens or have I got the idea wrong?

Ah, ok. I understand better now, thanks for the clarification.

The interrupt mode implementation is wrong, so you remove it and switch
to the polling mode until the interrupt is re-implemented in the correct
way.



-- 
<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	other threads:[~2020-11-30 12:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26 22:09 [PATCH] thermal: rcar_gen3_thermal: Do not use interrupts for normal operation Niklas Söderlund
2020-11-30  8:15 ` Daniel Lezcano
2020-11-30 11:49   ` Niklas Söderlund
2020-11-30 12:03     ` Daniel Lezcano [this message]
2020-12-07 13:47 ` [thermal: thermal/next] " thermal-bot for Niklas Söderlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=96a5db0a-a01d-f103-6b95-d645506cc711@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).