]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: stm32: Fix low threshold interrupt flood
authorPascal Paillet <p.paillet@st.com>
Fri, 10 Jan 2020 10:16:05 +0000 (11:16 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 27 Jan 2020 14:40:26 +0000 (15:40 +0100)
commit9e73a8f28c9a4f4c5c373555c85bd0c355879d0f
treea07cb8fa782dfa87304e6fbf6704b67528331fac
parent7ad916d5e026df9c2b7168661a3c74937b8d77d9
thermal: stm32: Fix low threshold interrupt flood

With the STM32 thermal peripheral, it is not possible to dump the
temperature that has caused the interrupt.
When the temperature reaches the low threshold, we generally read
a temperature that is a little bit higher than the low threshold.
This maybe due to sampling precision, and also because the CPU becomes
hotter when it quits WFI mode.
In that case, the framework does not change the trip points. This leads
to a lot of low threshold interrupts.

The fix is to set the low threshold value 0.5 degrees Celsius
below the actual request.

The problem is not so frequent with the high threshold and it would
no be a good idea to set the threshold value higher than the request.

Signed-off-by: Pascal Paillet <p.paillet@st.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200110101605.24984-7-p.paillet@st.com
drivers/thermal/st/stm_thermal.c