From 4cc0e91bcd3a076e304c41e92c9ceeff8a92194b Mon Sep 17 00:00:00 2001 From: Gopala Krishna Nuthaki Date: Thu, 21 May 2020 20:49:37 +0530 Subject: [PATCH] drivers: thermal: Force notify thermal to re-evaluate TSENS sensors If TSENS controller went to bad state while reading temperature of a sensor, TSENS invokes controller re-init code for all controller and then notifies the thermal framework to re-evaluate thermal for each sensor.But there is a chance that current notification API can bail out without re-evaluating thermal zone if none of the trips are violated. Notify the thermal framework with proper notification API to force re-evaluate thermal zone and make sure that all sensors are re-enabled next active trips. Change-Id: I0686fabba1ee17de1e859e6fcd3b0af7f40c8e73 Signed-off-by: Gopala Krishna Nuthaki --- drivers/thermal/msm-tsens.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/msm-tsens.c b/drivers/thermal/msm-tsens.c index c4099614f859..d79e32fd291f 100644 --- a/drivers/thermal/msm-tsens.c +++ b/drivers/thermal/msm-tsens.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. */ #include @@ -273,7 +273,7 @@ static void tsens_therm_fwk_notify(struct work_struct *work) } TSENS_DBG(tmdev, "Calling trip_temp for sensor %d\n", i); - of_thermal_handle_trip_temp(tmdev->sensor[i].tzd, temp); + of_thermal_handle_trip(tmdev->sensor[i].tzd); } } if (tmdev->min_temp_sensor_id != MIN_TEMP_DEF_OFFSET) { @@ -284,7 +284,7 @@ static void tsens_therm_fwk_notify(struct work_struct *work) return; } TSENS_DBG(tmdev, "Calling trip_temp for sensor %d\n", i); - of_thermal_handle_trip_temp(tmdev->min_temp.tzd, temp); + of_thermal_handle_trip(tmdev->min_temp.tzd); } }