]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
thermal/drivers/mediatek/lvts_thermal: Return error in case of invalid efuse data
authorJulien Panis <jpanis@baylibre.com>
Tue, 4 Jun 2024 16:46:58 +0000 (18:46 +0200)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Fri, 2 Aug 2024 14:27:19 +0000 (16:27 +0200)
commit615006972841bdee2804ac260d3dba533173163c
tree65b5fd0859f89fe782914bf1de6a47bf1bbcae65
parentd0c140e292a1ce029103cb3102f5cd79127a00a4
thermal/drivers/mediatek/lvts_thermal: Return error in case of invalid efuse data

BugLink: https://bugs.launchpad.net/bugs/2075154
[ Upstream commit 72cacd06e47d86d89b0e7179fbc9eb3a0f39cd93 ]

This patch prevents from registering thermal entries and letting the
driver misbehave if efuse data is invalid. A device is not properly
calibrated if the golden temperature is zero.

Fixes: f5f633b18234 ("thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver")
Signed-off-by: Julien Panis <jpanis@baylibre.com>
Reviewed-by: Nicolas Pitre <npitre@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240604-mtk-thermal-calib-check-v2-1-8f258254051d@baylibre.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/thermal/mediatek/lvts_thermal.c