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)(weight * 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
95 int cur_trip_level = get_trip_level(tz); in fair_share_throttle()
97 if (!tz->tzp || !tz->tzp->tbp) in fair_share_throttle()
100 tzp = tz->tzp; in fair_share_throttle()
107 instance = get_thermal_instance(tz, cdev, trip); in fair_share_throttle()
111 instance->target = get_target_state(tz, cdev, in fair_share_throttle()