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