Lines Matching refs:tz

152 	struct thermal_zone_device *tz;  member
551 static struct tz_episode *thermal_debugfs_tz_event_alloc(struct thermal_zone_device *tz, in thermal_debugfs_tz_event_alloc() argument
557 tze = kzalloc(struct_size(tze, trip_stats, tz->num_trips), GFP_KERNEL); in thermal_debugfs_tz_event_alloc()
565 for (i = 0; i < tz->num_trips; i++) { in thermal_debugfs_tz_event_alloc()
573 void thermal_debug_tz_trip_up(struct thermal_zone_device *tz, in thermal_debug_tz_trip_up() argument
578 struct thermal_debugfs *thermal_dbg = tz->debugfs; in thermal_debug_tz_trip_up()
579 int trip_id = thermal_zone_trip_id(tz, trip); in thermal_debug_tz_trip_up()
624 tze = thermal_debugfs_tz_event_alloc(tz, now); in thermal_debug_tz_trip_up()
656 void thermal_debug_tz_trip_down(struct thermal_zone_device *tz, in thermal_debug_tz_trip_down() argument
659 struct thermal_debugfs *thermal_dbg = tz->debugfs; in thermal_debug_tz_trip_down()
663 int trip_id = thermal_zone_trip_id(tz, trip); in thermal_debug_tz_trip_down()
717 void thermal_debug_update_trip_stats(struct thermal_zone_device *tz) in thermal_debug_update_trip_stats() argument
719 struct thermal_debugfs *thermal_dbg = tz->debugfs; in thermal_debug_update_trip_stats()
740 trip_stats->max = max(trip_stats->max, tz->temperature); in thermal_debug_update_trip_stats()
741 trip_stats->min = min(trip_stats->min, tz->temperature); in thermal_debug_update_trip_stats()
742 trip_stats->avg += (tz->temperature - trip_stats->avg) / in thermal_debug_update_trip_stats()
777 struct thermal_zone_device *tz = thermal_dbg->tz_dbg.tz; in tze_seq_show() local
801 for_each_trip_desc(tz, td) { in tze_seq_show()
813 trip_id = thermal_zone_trip_id(tz, trip); in tze_seq_show()
863 void thermal_debug_tz_add(struct thermal_zone_device *tz) in thermal_debug_tz_add() argument
868 thermal_dbg = thermal_debugfs_add_id(d_tz, tz->id); in thermal_debug_tz_add()
874 tz_dbg->tz = tz; in thermal_debug_tz_add()
876 tz_dbg->trips_crossed = kzalloc(sizeof(int) * tz->num_trips, GFP_KERNEL); in thermal_debug_tz_add()
887 tz->debugfs = thermal_dbg; in thermal_debug_tz_add()
890 void thermal_debug_tz_remove(struct thermal_zone_device *tz) in thermal_debug_tz_remove() argument
897 mutex_lock(&tz->lock); in thermal_debug_tz_remove()
899 thermal_dbg = tz->debugfs; in thermal_debug_tz_remove()
901 mutex_unlock(&tz->lock); in thermal_debug_tz_remove()
905 tz->debugfs = NULL; in thermal_debug_tz_remove()
907 mutex_unlock(&tz->lock); in thermal_debug_tz_remove()