]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: rockchip: fix up the tsadc pinctrl setting error
authorElaine Zhang <zhangqing@rock-chips.com>
Tue, 30 Apr 2019 10:09:44 +0000 (18:09 +0800)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 14 May 2019 14:00:38 +0000 (07:00 -0700)
commit8ecce283e6181c55dc84b201404d5bbdde610497
tree48c4ffc2ecf7deaed0f37d854e1be8187d6a87be
parent9f12e11ec29d39bbbdc194c6551bda2ee0dc1d55
thermal: rockchip: fix up the tsadc pinctrl setting error

Explicitly use the pinctrl to set/unset the right mode
instead of relying on the pinctrl init mode.
And it requires setting the tshut polarity before select pinctrl.

When the temperature sensor mode is set to 0, it will automatically
reset the board via the Clock-Reset-Unit (CRU) if the over temperature
threshold is reached. However, when the pinctrl initializes, it does a
transition to "otp_out" which may lead the SoC restart all the time.

"otp_out" IO may be connected to the RESET circuit on the hardware.
If the IO is in the wrong state, it will trigger RESET.
(similar to the effect of pressing the RESET button)
which will cause the soc to restart all the time.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/rockchip_thermal.c