]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
thermal: exynos: Reading temperature makes sense only when TMU is turned on
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 16 Apr 2018 10:11:52 +0000 (12:11 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:26:10 +0000 (12:26 +0200)
commit8d5dbbf79a469cd7cd0e6c0914fba1668b761f49
tree003774d1d50b9d46db93a59deecff3eb83833c38
parent2eaeba6dd07ef10d79123f932d211c50ff688c12
thermal: exynos: Reading temperature makes sense only when TMU is turned on

BugLink: http://bugs.launchpad.net/bugs/1780499
commit 88fc6f73fddf64eb507b04f7b2bd01d7291db514 upstream.

When thermal sensor is not yet enabled, reading temperature might return
random value. This might even result in stopping system booting when such
temperature is higher than the critical value. Fix this by checking if TMU
has been actually enabled before reading the temperature.

This change fixes booting of Exynos4210-based board with TMU enabled (for
example Samsung Trats board), which was broken since v4.4 kernel release.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Fixes: 9e4249b40340 ("thermal: exynos: Fix first temperature read after registering sensor")
CC: stable@vger.kernel.org # v4.6+
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/thermal/samsung/exynos_tmu.c