thermal: sensor: fix thermal disabled mode issue [1/1]
authorHuan Biao <huan.biao@amlogic.com>
Thu, 15 Nov 2018 07:24:23 +0000 (15:24 +0800)
committerHuan Biao <huan.biao@amlogic.com>
Thu, 15 Nov 2018 07:24:47 +0000 (15:24 +0800)
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 <huan.biao@amlogic.com>
drivers/amlogic/thermal/meson_tsensor.c

index ff5d8c0..1869983 100644 (file)
@@ -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);