Lines Matching refs:tz
22 static int get_trip_level(struct thermal_zone_device *tz) in get_trip_level() argument
27 for (count = 0; count < tz->num_trips; count++) { in get_trip_level()
28 __thermal_zone_get_trip(tz, count, &trip); in get_trip_level()
29 if (tz->temperature < trip.temperature) in get_trip_level()
38 trace_thermal_zone_trip(tz, count - 1, trip.type); in get_trip_level()
43 static long get_target_state(struct thermal_zone_device *tz, in get_target_state() argument
46 return (long)(percentage * level * cdev->max_state) / (100 * tz->num_trips); in get_target_state()
68 static int fair_share_throttle(struct thermal_zone_device *tz, int trip_index) in fair_share_throttle() argument
70 const struct thermal_trip *trip = &tz->trips[trip_index]; in fair_share_throttle()
74 int cur_trip_level = get_trip_level(tz); in fair_share_throttle()
76 lockdep_assert_held(&tz->lock); in fair_share_throttle()
78 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in fair_share_throttle()
86 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in fair_share_throttle()
98 instance->target = get_target_state(tz, cdev, percentage, in fair_share_throttle()