Lines Matching refs:tz
34 static int get_trip_level(struct thermal_zone_device *tz) in get_trip_level() argument
40 if (tz->trips == 0 || !tz->ops->get_trip_temp) in get_trip_level()
43 for (count = 0; count < tz->trips; count++) { in get_trip_level()
44 tz->ops->get_trip_temp(tz, count, &trip_temp); in get_trip_level()
45 if (tz->temperature < trip_temp) in get_trip_level()
54 tz->ops->get_trip_type(tz, count - 1, &trip_type); in get_trip_level()
55 trace_thermal_zone_trip(tz, count - 1, trip_type); in get_trip_level()
61 static long get_target_state(struct thermal_zone_device *tz, in get_target_state() argument
68 return (long)(percentage * level * max_state) / (100 * tz->trips); in get_target_state()
89 static int fair_share_throttle(struct thermal_zone_device *tz, int trip) in fair_share_throttle() argument
94 int cur_trip_level = get_trip_level(tz); in fair_share_throttle()
96 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in fair_share_throttle()
104 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in fair_share_throttle()
116 instance->target = get_target_state(tz, cdev, percentage, in fair_share_throttle()