From 745ff71031098bfb0ef19b5dd639e68f55b76b6f Mon Sep 17 00:00:00 2001 From: Huan Biao Date: Thu, 15 Nov 2018 15:24:23 +0800 Subject: [PATCH] thermal: sensor: fix thermal disabled mode issue [1/1] PD#SWPL-2130 Problem: tsensor driver update thermal event when mode disabled Solution: fix tsensor disable mode issue Verify: A311D W400 pass Change-Id: If9e3d3ea15732a0efbd8314003b27bc0bdf3e476 Signed-off-by: Huan Biao --- drivers/amlogic/thermal/meson_tsensor.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/amlogic/thermal/meson_tsensor.c b/drivers/amlogic/thermal/meson_tsensor.c index ff5d8c0..1869983 100644 --- a/drivers/amlogic/thermal/meson_tsensor.c +++ b/drivers/amlogic/thermal/meson_tsensor.c @@ -160,6 +160,12 @@ static void meson_report_trigger(struct meson_tsensor_data *p) pr_err("No thermal zone device defined\n"); return; } + /* + *if passive delay and polling delay all is zero + *mean thermal mode disabled, disable update envent + */ + if (0 == (tz->passive_delay || tz->polling_delay)) + return; thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); -- 2.7.4