Merge "drivers: thermal: notify at least one thermal zone if no trips are violated"
This commit is contained in:
commit
45bf94257d
1 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue