Lines Matching refs:tz

117 static void update_passive_instance(struct thermal_zone_device *tz,  in update_passive_instance()  argument
125 tz->passive += value; in update_passive_instance()
128 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) in thermal_zone_trip_update() argument
138 trip_temp = tz->forced_passive; in thermal_zone_trip_update()
141 tz->ops->get_trip_temp(tz, trip, &trip_temp); in thermal_zone_trip_update()
142 tz->ops->get_trip_type(tz, trip, &trip_type); in thermal_zone_trip_update()
145 trend = get_tz_trend(tz, trip); in thermal_zone_trip_update()
147 if (tz->temperature >= trip_temp) { in thermal_zone_trip_update()
149 trace_thermal_zone_trip(tz, trip, trip_type); in thermal_zone_trip_update()
152 dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n", in thermal_zone_trip_update()
155 mutex_lock(&tz->lock); in thermal_zone_trip_update()
157 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in thermal_zone_trip_update()
172 update_passive_instance(tz, trip_type, 1); in thermal_zone_trip_update()
176 update_passive_instance(tz, trip_type, -1); in thermal_zone_trip_update()
184 mutex_unlock(&tz->lock); in thermal_zone_trip_update()
198 static int step_wise_throttle(struct thermal_zone_device *tz, int trip) in step_wise_throttle() argument
202 thermal_zone_trip_update(tz, trip); in step_wise_throttle()
204 if (tz->forced_passive) in step_wise_throttle()
205 thermal_zone_trip_update(tz, THERMAL_TRIPS_NONE); in step_wise_throttle()
207 mutex_lock(&tz->lock); in step_wise_throttle()
209 list_for_each_entry(instance, &tz->thermal_instances, tz_node) in step_wise_throttle()
212 mutex_unlock(&tz->lock); in step_wise_throttle()