Skip to content

Commit

Permalink
thermal: intel: pch: Fix unexpected shutdown at critical temperature
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Kai-Heng Feng authored and Daniel Lezcano committed Jan 19, 2021
1 parent dd47366 commit 0367196
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/thermal/intel/intel_pch_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,16 @@ static int pch_get_trip_temp(struct thermal_zone_device *tzd, int trip, int *tem
return 0;
}

static void pch_critical(struct thermal_zone_device *tzd)
{
dev_dbg(&tzd->device, "%s: critical temperature reached\n", tzd->type);
}

static struct thermal_zone_device_ops tzd_ops = {
.get_temp = pch_thermal_get_temp,
.get_trip_type = pch_get_trip_type,
.get_trip_temp = pch_get_trip_temp,
.critical = pch_critical,
};

enum board_ids {
Expand Down

0 comments on commit 0367196

Please sign in to comment.