Lines Matching full:trip
40 * __thermal_zone_set_trips - Computes the next trip points for the driver
44 * the trip points. The result is the closer low and high trip points
56 struct thermal_trip trip; in __thermal_zone_set_trips() local
68 ret = __thermal_zone_get_trip(tz, i , &trip); in __thermal_zone_set_trips()
72 trip_low = trip.temperature - trip.hysteresis; in __thermal_zone_set_trips()
77 if (trip.temperature > tz->temperature && in __thermal_zone_set_trips()
78 trip.temperature < high) in __thermal_zone_set_trips()
79 high = trip.temperature; in __thermal_zone_set_trips()
82 /* No need to change trip points */ in __thermal_zone_set_trips()
102 struct thermal_trip *trip) in __thermal_zone_get_trip() argument
104 if (!tz || !tz->trips || trip_id < 0 || trip_id >= tz->num_trips || !trip) in __thermal_zone_get_trip()
107 *trip = tz->trips[trip_id]; in __thermal_zone_get_trip()
113 struct thermal_trip *trip) in thermal_zone_get_trip() argument
118 ret = __thermal_zone_get_trip(tz, trip_id, trip); in thermal_zone_get_trip()
126 const struct thermal_trip *trip) in thermal_zone_set_trip() argument
138 if (t.type != trip->type) in thermal_zone_set_trip()
141 if (t.temperature != trip->temperature && tz->ops->set_trip_temp) { in thermal_zone_set_trip()
142 ret = tz->ops->set_trip_temp(tz, trip_id, trip->temperature); in thermal_zone_set_trip()
147 if (t.hysteresis != trip->hysteresis && tz->ops->set_trip_hyst) { in thermal_zone_set_trip()
148 ret = tz->ops->set_trip_hyst(tz, trip_id, trip->hysteresis); in thermal_zone_set_trip()
153 if (tz->trips && (t.temperature != trip->temperature || t.hysteresis != trip->hysteresis)) in thermal_zone_set_trip()
154 tz->trips[trip_id] = *trip; in thermal_zone_set_trip()
156 thermal_notify_tz_trip_change(tz->id, trip_id, trip->type, in thermal_zone_set_trip()
157 trip->temperature, trip->hysteresis); in thermal_zone_set_trip()