Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

thermal: intel: pch: Fix unexpected shutdown at critical temperature

Like previous patch, the intel_pch_thermal device is not in ACPI
ThermalZone namespace, so a critical trip doesn't mean shutdown.

Override the default .critical callback to prevent surprising thermal
shutdoown.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201221172345.36976-2-kai.heng.feng@canonical.com

authored by

Kai-Heng Feng and committed by
Daniel Lezcano
03671968 dd47366a

+6
+6
drivers/thermal/intel/intel_pch_thermal.c
··· 326 326 return 0; 327 327 } 328 328 329 + static void pch_critical(struct thermal_zone_device *tzd) 330 + { 331 + dev_dbg(&tzd->device, "%s: critical temperature reached\n", tzd->type); 332 + } 333 + 329 334 static struct thermal_zone_device_ops tzd_ops = { 330 335 .get_temp = pch_thermal_get_temp, 331 336 .get_trip_type = pch_get_trip_type, 332 337 .get_trip_temp = pch_get_trip_temp, 338 + .critical = pch_critical, 333 339 }; 334 340 335 341 enum board_ids {