Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00a932c8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "thermal_core: Add sysfs notification support for userspace"

parents 9bf06c5c 94c6e235
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -39,6 +39,8 @@

#include "thermal_core.h"

#define THERMAL_UEVENT_DATA "type"

MODULE_AUTHOR("Zhang Rui");
MODULE_DESCRIPTION("Generic thermal management sysfs support");
MODULE_LICENSE("GPL v2");
@@ -315,6 +317,10 @@ int thermal_sensor_trip(struct thermal_zone_device *tz,
			((trip == THERMAL_TRIP_CONFIGURABLE_HI) &&
				(pos->temp >= tz->sensor.threshold_max) &&
				(pos->temp <= temp))) {
			if ((pos == &tz->tz_threshold[0])
				|| (pos == &tz->tz_threshold[1]))
				sysfs_notify(&tz->device.kobj, NULL,
					THERMAL_UEVENT_DATA);
			pos->active = 0;
			pos->notify(trip, temp, pos->data);
		}