linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>
Cc: linux-pm@vger.kernel.org, Vincent Guittot <vincent.guittot@linaro.org>
Subject: Re: [PATCH 3/3 v4] thermal: db8500: Rewrite to be a pure OF sensor
Date: Wed, 28 Aug 2019 15:21:18 +0200	[thread overview]
Message-ID: <38e13d63-588c-a950-3aff-20ed26105b26@linaro.org> (raw)
In-Reply-To: <20190828130320.6174-3-linus.walleij@linaro.org>

On 28/08/2019 15:03, Linus Walleij wrote:
> This patch rewrites the DB8500 thermal sensor to be a
> pure OF sensor, so that it can be used with thermal zones
> defined in the device tree.
> 
> This driver was initially merged before we had generic
> thermal zone device tree bindings, and now it gets
> modernized to the way we do things these days.
> 
> The old driver depended on a set of trigger points
> provided in the device tree or platform data to
> interpolate the current temperature between trigger
> points depending on whether the trend was rising or
> falling. This was bad because the trigger points should
> be used for defining temperature zone policies and
> bind to cooling devices.
> 
> As the PRCMU (power reset control management unit) can
> only issue IRQs when we pass temperature trigger points
> upward or downward We instead define a number of
> temperature points inside the driver ranging from
> 15 to 100 degrees celsius. The effect is that when
> we register the device we quickly trigger 15, 20 ... up
> to the room temperature in succession and then we
> get continous event IRQs also under normal operating
> conditions, and the temperature of the system is now
> reported more accurately (+/- 2.5 degrees celsius)
> while in the past the first trigger point was at 70
> degrees and the average temperature was simply reported
> as 35 degrees celsius (between 70 degrees and 0) until
> we passed 70 degrees which didn't accurately represent
> the temperature of the system.
> 
> As a result of dropping all the trigger points from the
> driver and reusing the core DT thermal zone management
> code we reduce the code footprint quite a bit.
> 
> Cc: Vincent Guittot <vincent.guittot@linaro.org>
> Suggested-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>

> ChangeLog v3->v4:
> - Drop the pointless work and update the thermal zone
>   directly from the threaded interrupt handler, we are in
>   process context already.
> ChangeLog v2->v3:
> - Drop pointless mode in the state container
> - Drop pointless mutex
> ChangeLog v1->v2:
> - New patch as suggested by Daniel.
> ---

[ ... ]


-- 
 <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-28 13:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28 13:03 [PATCH 1/3 v4] thermal: db8500: Finalize device tree conversion Linus Walleij
2019-08-28 13:03 ` [PATCH 2/3 v4] thermal: db8500: Use dev helper variable Linus Walleij
2019-08-28 13:03 ` [PATCH 3/3 v4] thermal: db8500: Rewrite to be a pure OF sensor Linus Walleij
2019-08-28 13:21   ` Daniel Lezcano [this message]
2019-09-16 22:55 ` [PATCH 1/3 v4] thermal: db8500: Finalize device tree conversion 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=38e13d63-588c-a950-3aff-20ed26105b26@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=edubezval@gmail.com \
    --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 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).