Lines Matching refs:tz
105 static void update_passive_instance(struct thermal_zone_device *tz,
113 tz->passive += value;
116 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
126 trip_temp = tz->forced_passive;
129 tz->ops->get_trip_temp(tz, trip, &trip_temp);
130 tz->ops->get_trip_type(tz, trip, &trip_type);
133 trend = get_tz_trend(tz, trip);
135 if (tz->temperature >= trip_temp) {
137 trace_thermal_zone_trip(tz, trip, trip_type);
140 dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n",
143 mutex_lock(&tz->lock);
145 list_for_each_entry(instance, &tz->thermal_instances, tz_node) {
160 update_passive_instance(tz, trip_type, 1);
164 update_passive_instance(tz, trip_type, -1);
172 mutex_unlock(&tz->lock);
177 * @tz: thermal_zone_device
186 static int step_wise_throttle(struct thermal_zone_device *tz, int trip)
190 thermal_zone_trip_update(tz, trip);
192 if (tz->forced_passive)
193 thermal_zone_trip_update(tz, THERMAL_TRIPS_NONE);
195 mutex_lock(&tz->lock);
197 list_for_each_entry(instance, &tz->thermal_instances, tz_node)
200 mutex_unlock(&tz->lock);