Lines Matching refs:tz
20 * @tz: thermal zone device
22 static int get_trip_level(struct thermal_zone_device *tz)
28 if (tz->trips == 0 || !tz->ops->get_trip_temp)
31 for (count = 0; count < tz->trips; count++) {
32 tz->ops->get_trip_temp(tz, count, &trip_temp);
33 if (tz->temperature < trip_temp)
42 tz->ops->get_trip_type(tz, count - 1, &trip_type);
43 trace_thermal_zone_trip(tz, count - 1, trip_type);
49 static long get_target_state(struct thermal_zone_device *tz,
56 return (long)(percentage * level * max_state) / (100 * tz->trips);
61 * @tz: thermal_zone_device
78 static int fair_share_throttle(struct thermal_zone_device *tz, int trip)
83 int cur_trip_level = get_trip_level(tz);
85 mutex_lock(&tz->lock);
87 list_for_each_entry(instance, &tz->thermal_instances, tz_node) {
95 list_for_each_entry(instance, &tz->thermal_instances, tz_node) {
107 instance->target = get_target_state(tz, cdev, percentage,
116 mutex_unlock(&tz->lock);