Lines Matching +full:high +full:- +full:threshold
1 // SPDX-License-Identifier: GPL-2.0
35 ret = cb(&td->trip, data); in for_each_thermal_trip()
50 mutex_lock(&tz->lock); in thermal_zone_for_each_trip()
52 mutex_unlock(&tz->lock); in thermal_zone_for_each_trip()
58 void thermal_zone_set_trips(struct thermal_zone_device *tz, int low, int high) in thermal_zone_set_trips() argument
62 lockdep_assert_held(&tz->lock); in thermal_zone_set_trips()
64 if (!tz->ops.set_trips) in thermal_zone_set_trips()
68 if (tz->prev_low_trip == low && tz->prev_high_trip == high) in thermal_zone_set_trips()
71 tz->prev_low_trip = low; in thermal_zone_set_trips()
72 tz->prev_high_trip = high; in thermal_zone_set_trips()
74 dev_dbg(&tz->device, in thermal_zone_set_trips()
75 "new temperature boundaries: %d < x < %d\n", low, high); in thermal_zone_set_trips()
81 ret = tz->ops.set_trips(tz, low, high); in thermal_zone_set_trips()
83 dev_err(&tz->device, "Failed to set trips: %d\n", ret); in thermal_zone_set_trips()
93 return trip_to_trip_desc(trip) - tz->trips; in thermal_zone_trip_id()
99 WRITE_ONCE(trip->hysteresis, hyst); in thermal_zone_set_trip_hyst()
106 if (trip->temperature == temp) in thermal_zone_set_trip_temp()
109 WRITE_ONCE(trip->temperature, temp); in thermal_zone_set_trip_temp()
115 if (tz->temperature >= td->threshold) { in thermal_zone_set_trip_temp()
121 if (trip->type == THERMAL_TRIP_PASSIVE) { in thermal_zone_set_trip_temp()
122 tz->passive--; in thermal_zone_set_trip_temp()
123 WARN_ON_ONCE(tz->passive < 0); in thermal_zone_set_trip_temp()
128 * Invalidate the threshold to avoid triggering a spurious in thermal_zone_set_trip_temp()
131 td->threshold = INT_MAX; in thermal_zone_set_trip_temp()