Lines Matching full:trip
37 * __thermal_zone_set_trips - Computes the next trip points for the driver
41 * the trip points. The result is the closer low and high trip points
53 struct thermal_trip trip; in __thermal_zone_set_trips() local
67 ret = __thermal_zone_get_trip(tz, i , &trip); in __thermal_zone_set_trips()
71 trip_low = trip.temperature - trip.hysteresis; in __thermal_zone_set_trips()
79 if (trip.temperature > tz->temperature && in __thermal_zone_set_trips()
80 trip.temperature < high) { in __thermal_zone_set_trips()
81 high = trip.temperature; in __thermal_zone_set_trips()
86 /* No need to change trip points */ in __thermal_zone_set_trips()
114 struct thermal_trip *trip) in __thermal_zone_get_trip() argument
116 if (!tz || !tz->trips || trip_id < 0 || trip_id >= tz->num_trips || !trip) in __thermal_zone_get_trip()
119 *trip = tz->trips[trip_id]; in __thermal_zone_get_trip()
125 struct thermal_trip *trip) in thermal_zone_get_trip() argument
130 ret = __thermal_zone_get_trip(tz, trip_id, trip); in thermal_zone_get_trip()
138 const struct thermal_trip *trip) in thermal_zone_set_trip() argument
150 if (t.type != trip->type) in thermal_zone_set_trip()
153 if (t.temperature != trip->temperature && tz->ops->set_trip_temp) { in thermal_zone_set_trip()
154 ret = tz->ops->set_trip_temp(tz, trip_id, trip->temperature); in thermal_zone_set_trip()
159 if (t.hysteresis != trip->hysteresis && tz->ops->set_trip_hyst) { in thermal_zone_set_trip()
160 ret = tz->ops->set_trip_hyst(tz, trip_id, trip->hysteresis); in thermal_zone_set_trip()
165 if (tz->trips && (t.temperature != trip->temperature || t.hysteresis != trip->hysteresis)) in thermal_zone_set_trip()
166 tz->trips[trip_id] = *trip; in thermal_zone_set_trip()
168 thermal_notify_tz_trip_change(tz->id, trip_id, trip->type, in thermal_zone_set_trip()
169 trip->temperature, trip->hysteresis); in thermal_zone_set_trip()
177 const struct thermal_trip *trip) in thermal_zone_trip_id() argument
182 if (&tz->trips[i] == trip) in thermal_zone_trip_id()