Merge "drivers: thermal: notify at least one thermal zone if no trips are violated"

This commit is contained in:
qctecmdr 2020-09-04 17:19:32 -07:00 committed by Gerrit - the friendly Code Review server
commit 45bf94257d

View file

@ -637,6 +637,7 @@ static void handle_thermal_trip(struct thermal_zone_device *tz,
struct thermal_zone_device *zone;
struct __thermal_zone *data = tz->devdata;
struct list_head *head;
bool notify = false;
head = &data->senps->first_tz;
list_for_each_entry(data, head, list) {
@ -649,10 +650,19 @@ static void handle_thermal_trip(struct thermal_zone_device *tz,
} else {
if (!of_thermal_is_trips_triggered(zone, trip_temp))
continue;
notify = true;
thermal_zone_device_update_temp(zone,
THERMAL_EVENT_UNSPECIFIED, trip_temp);
}
}
/*
* It is better to notify at least one thermal zone if trip is violated
* for none.
*/
if (temp_valid && !notify)
thermal_zone_device_update_temp(tz, THERMAL_EVENT_UNSPECIFIED,
trip_temp);
}
/*