Lines Matching full:tz
122 * @node: a list element to be added to the list of tz events
146 * @tz: thermal zone this object belongs to
152 struct thermal_zone_device *tz; member
556 static struct tz_episode *thermal_debugfs_tz_event_alloc(struct thermal_zone_device *tz, in thermal_debugfs_tz_event_alloc() argument
562 tze = kzalloc(struct_size(tze, trip_stats, tz->num_trips), GFP_KERNEL); in thermal_debugfs_tz_event_alloc()
571 for (i = 0; i < tz->num_trips; i++) { in thermal_debugfs_tz_event_alloc()
579 void thermal_debug_tz_trip_up(struct thermal_zone_device *tz, in thermal_debug_tz_trip_up() argument
582 struct thermal_debugfs *thermal_dbg = tz->debugfs; in thermal_debug_tz_trip_up()
583 int trip_id = thermal_zone_trip_id(tz, trip); in thermal_debug_tz_trip_up()
630 tze = thermal_debugfs_tz_event_alloc(tz, now); in thermal_debug_tz_trip_up()
672 void thermal_debug_tz_trip_down(struct thermal_zone_device *tz, in thermal_debug_tz_trip_down() argument
675 struct thermal_debugfs *thermal_dbg = tz->debugfs; in thermal_debug_tz_trip_down()
676 int trip_id = thermal_zone_trip_id(tz, trip); in thermal_debug_tz_trip_down()
727 void thermal_debug_update_trip_stats(struct thermal_zone_device *tz) in thermal_debug_update_trip_stats() argument
729 struct thermal_debugfs *thermal_dbg = tz->debugfs; in thermal_debug_update_trip_stats()
746 if (tz->temperature > tze->max_temp) in thermal_debug_update_trip_stats()
747 tze->max_temp = tz->temperature; in thermal_debug_update_trip_stats()
753 trip_stats->min = min(trip_stats->min, tz->temperature); in thermal_debug_update_trip_stats()
754 trip_stats->avg += (tz->temperature - trip_stats->avg) / in thermal_debug_update_trip_stats()
789 struct thermal_zone_device *tz = thermal_dbg->tz_dbg.tz; in tze_seq_show() local
812 for_each_trip_desc(tz, td) { in tze_seq_show()
824 trip_id = thermal_zone_trip_id(tz, trip); in tze_seq_show()
866 void thermal_debug_tz_add(struct thermal_zone_device *tz) in thermal_debug_tz_add() argument
871 thermal_dbg = thermal_debugfs_add_id(d_tz, tz->id); in thermal_debug_tz_add()
877 tz_dbg->tz = tz; in thermal_debug_tz_add()
879 tz_dbg->trips_crossed = kzalloc(sizeof(int) * tz->num_trips, GFP_KERNEL); in thermal_debug_tz_add()
890 tz->debugfs = thermal_dbg; in thermal_debug_tz_add()
893 static struct thermal_debugfs *thermal_debug_tz_clear(struct thermal_zone_device *tz) in thermal_debug_tz_clear() argument
897 guard(thermal_zone)(tz); in thermal_debug_tz_clear()
899 thermal_dbg = tz->debugfs; in thermal_debug_tz_clear()
901 tz->debugfs = NULL; in thermal_debug_tz_clear()
906 void thermal_debug_tz_remove(struct thermal_zone_device *tz) in thermal_debug_tz_remove() argument
913 thermal_dbg = thermal_debug_tz_clear(tz); in thermal_debug_tz_remove()
934 void thermal_debug_tz_resume(struct thermal_zone_device *tz) in thermal_debug_tz_resume() argument
936 struct thermal_debugfs *thermal_dbg = tz->debugfs; in thermal_debug_tz_resume()