linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thermal: core: Add thermal zone enable/disable notification
@ 2020-07-27 23:10 Daniel Lezcano
  2020-07-28  7:49 ` Zhang Rui
  2020-07-29  5:36 ` Amit Kucheria
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Lezcano @ 2020-07-27 23:10 UTC (permalink / raw)
  To: daniel.lezcano, rui.zhang
  Cc: amit.kucheria, andrzej.p, linux-pm, linux-kernel, thierry.reding

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>
---
 drivers/thermal/thermal_core.c | 5 +++++
 1 file changed, 5 insertions(+)

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;
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-29  8:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 23:10 [PATCH] thermal: core: Add thermal zone enable/disable notification Daniel Lezcano
2020-07-28  7:49 ` Zhang Rui
2020-07-29  5:36 ` Amit Kucheria
2020-07-29  8:40   ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).