summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/thermal_core.c
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2020-07-28 01:10:33 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-07-29 10:21:48 +0200
commit25be77e588a63b064e8d9c1b59975e6882abc2f9 (patch)
tree3539669f4fa5606a1ef06880c64b241f3f9c5280 /drivers/thermal/thermal_core.c
parent332bc8ebab2c0d00e80dd23377ec23ad3de83214 (diff)
downloadlinux-25be77e588a63b064e8d9c1b59975e6882abc2f9.tar.bz2
thermal: core: Add thermal zone enable/disable notification
Now the calls to enable/disable a thermal zone are centralized in a call to a function, we can add in these the corresponding netlink notifications. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Zhang Rui <rui.zhang@intel.com> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org> Link: https://lore.kernel.org/r/20200727231033.26512-1-daniel.lezcano@linaro.org
Diffstat (limited to 'drivers/thermal/thermal_core.c')
-rw-r--r--drivers/thermal/thermal_core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 9748fbb9a3a1..72bf159bcecc 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -509,6 +509,11 @@ static int thermal_zone_device_set_mode(struct thermal_zone_device *tz,
thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
+ if (mode == THERMAL_DEVICE_ENABLED)
+ thermal_notify_tz_enable(tz->id);
+ else
+ thermal_notify_tz_disable(tz->id);
+
return ret;
}