diff options
-rw-r--r-- | drivers/mxc/thermal/thermal.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mxc/thermal/thermal.c b/drivers/mxc/thermal/thermal.c index 109ea2b6cf00..ea83121a875c 100644 --- a/drivers/mxc/thermal/thermal.c +++ b/drivers/mxc/thermal/thermal.c @@ -334,6 +334,11 @@ static int anatop_thermal_get_temp(struct thermal_zone_device *thermal, *temp = (cooling_device_disable && tz->temperature >= KELVIN_TO_CEL(TEMP_CRITICAL, KELVIN_OFFSET)) ? KELVIN_TO_CEL(TEMP_CRITICAL - 1, KELVIN_OFFSET) : tz->temperature; + /* Set alarm threshold if necessary */ + if ((__raw_readl(anatop_base + HW_ANADIG_TEMPSENSE0) & + BM_ANADIG_TEMPSENSE0_ALARM_VALUE) == 0) + anatop_update_alarm(raw_critical); + return 0; } @@ -874,7 +879,6 @@ static int anatop_thermal_counting_ratio(unsigned int fuse_data) /* Init default critical temp to set alarm */ raw_critical = raw_25c - ratio * (KELVIN_TO_CEL(TEMP_CRITICAL, KELVIN_OFFSET) - 25) / 100; clk_enable(pll3_clk); - anatop_update_alarm(raw_critical); return ret; } |