diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2019-08-28 16:03:20 +0300 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2019-09-25 08:59:22 +0300 |
commit | 6c375eccded41df8033ed55a1b785531b304fc67 (patch) | |
tree | aee21b3a887bef30f158f823a8e2ea2c1d2622f5 /include/trace/events/vmscan.h | |
parent | 3de9e4dff889531d517c8808898972e96fa507b2 (diff) | |
download | linux-6c375eccded41df8033ed55a1b785531b304fc67.tar.xz |
thermal: db8500: Rewrite to be a pure OF sensor
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>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'include/trace/events/vmscan.h')
0 files changed, 0 insertions, 0 deletions