All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>,
	Vincent Guittot <vincent.guittot@linaro.org>
Cc: Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	Linux PM list <linux-pm@vger.kernel.org>,
	Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH 1/2] thermal: db8500: Finalize device tree conversion
Date: Tue, 27 Aug 2019 15:54:44 +0200	[thread overview]
Message-ID: <f683466b-a554-87c4-0bfd-4d56bd1142fe@linaro.org> (raw)
In-Reply-To: <CACRpkdYO7zzrUg=7=4D7XMUwoa6XQggm0jB1PtPhKK=3EV9AyQ@mail.gmail.com>

On 27/08/2019 15:07, Linus Walleij wrote:
> On Thu, Aug 22, 2019 at 8:16 AM Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
> 
>> Another point is there are too many trip points, two should be enough,
>> one for throttling and one for critical, the governor will handle that
>> properly by stepping the opps.
> 
> I looked a bit into this, and it seems that there are a number of
> trip points simply for inspecting the system (Vincent may know better
> because he worked directly with this): the thermal sensor can only
> set an IRQ for a certain temperature, there is no interface to just
> read the temperature. 

I see, it is a limitation of the sensor.

> By setting a number of trip points and
> first let the IRQ fire at the lowest you see how the system moves
> up in the temperature points and that makes it easier to inspect,
> so this sensor will set 70 degress, wait until the IRQ fires,
> then set 75 degrees, wait until IRQ fires, set 80 degrees...
> etc. It does the same with the IRQ for falling temperature so it
> moves up and down this scale, and interpolates the temperature
> between the trip points.
> 
> It is a bit crude but it gives some kind of granularity and control
> over the reported temperature from the sensor.
> 
> I think this is something that should be done inside the
> driver, not by abusing the trip points, so I try to rewrite the logic
> so that the driver fires these IRQs internally without using any
> trip points from the thermal subsystem.

In the comments, it is mentioned something is missing with the PRCMU but
when the interface will be available, the get_temp won't have to
interpolate. Wouldn't make sense to add the PRCMU interface instead ?


-- 
 <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:[~2019-08-27 13:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17  6:32 [PATCH 1/2] thermal: db8500: Finalize device tree conversion Linus Walleij
2019-07-17  6:32 ` [PATCH 2/2] thermal: db8500: Use dev helper variable Linus Walleij
2019-07-25 12:21 ` [PATCH 1/2] thermal: db8500: Finalize device tree conversion Lee Jones
2019-08-03 13:58 ` Linus Walleij
2019-08-11 22:21   ` Linus Walleij
2019-08-22  6:16 ` Daniel Lezcano
2019-08-27 11:21   ` Linus Walleij
2019-08-27 13:24     ` Daniel Lezcano
2019-08-27 13:07   ` Linus Walleij
2019-08-27 13:54     ` Daniel Lezcano [this message]
2019-08-28  8:57       ` Linus Walleij
2019-08-28  9:04         ` Daniel Lezcano
2019-08-28 12:20           ` Linus Walleij

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=f683466b-a554-87c4-0bfd-4d56bd1142fe@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=edubezval@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=vincent.guittot@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.