Well actually you are right, I reproduced the scenario with temperature emulation. I'll investigate how to handle this case.+ if (tz->last_temperature < trip_temp && tz->temperature >=
trip_temp &&
+ trip != tz->prev_trip) {
+ thermal_notify_tz_trip_up(tz->id, trip, tz-
temperature);+ tz->prev_trip = trip;
+
+ } else if (tz->last_temperature >= trip_low_temp && tz-
temperature < trip_low_temp &&+ trip == tz->prev_trip) {
+ thermal_notify_tz_trip_down(tz->id, trip, tz-
temperature);+ tz->prev_trip = trip - 1;
Say, let's assume hysteresis is Zero,
When the temperature increases and we do thermal_notify_tz_trip_up()
for trip 0 and trip 1, tz->prev_trip is set to 1 in this case.
And then the temperature drops below trip 0, we don't have chance to do
thermal_notify_tz_trip_down() for trip 0, because we always handle the
trips in ascending order, and tz->prev_trip is 1 when we do
handle_thermal_trip(0).