From 8eef4d5c15fdb9dbb89d1d26fb9f66edf1952f5e Mon Sep 17 00:00:00 2001 From: "zhenxin.pu" Date: Fri, 3 Jan 2020 14:41:10 +0800 Subject: [PATCH] Thermal: SM1: thermal driver print error [2/2] PD#SWPL-18939 Problem: high temp restart fails to offline cpus Solution: make cpucore current state update at meson cdev probe Verify: S905X3_AC214 Change-Id: I1ab1e6b5219d8f62c5ad8586eaf614a5f3833765 Signed-off-by: zhenxin.pu --- drivers/amlogic/thermal/meson_cooldev.c | 2 ++ drivers/thermal/thermal_core.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/amlogic/thermal/meson_cooldev.c b/drivers/amlogic/thermal/meson_cooldev.c index b12bdd9714d7..8ee885970c90 100644 --- a/drivers/amlogic/thermal/meson_cooldev.c +++ b/drivers/amlogic/thermal/meson_cooldev.c @@ -152,6 +152,8 @@ static int meson_set_min_status(struct thermal_cooling_device *cdev, for (i = 0; i < tzd->trips; i++) thermal_set_upper(tzd, cdev, i, min_state); + thermal_zone_device_update(tzd, + THERMAL_EVENT_UNSPECIFIED); err = 1; } } diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 508719f28e25..d1b40670f0c7 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -484,6 +484,8 @@ static bool can_notify(struct thermal_zone_device *tz, tz->temperature, hyst, trip_temp, tz->hot_step); return true; } + if (tz->hot_step != 0) + return true; return false; } #endif