Lines Matching full:tz

120  * @node: a list element to be added to the list of tz events
521 static struct tz_episode *thermal_debugfs_tz_event_alloc(struct thermal_zone_device *tz, in thermal_debugfs_tz_event_alloc() argument
527 tze = kzalloc(struct_size(tze, trip_stats, tz->num_trips), GFP_KERNEL); in thermal_debugfs_tz_event_alloc()
534 for (i = 0; i < tz->num_trips; i++) { in thermal_debugfs_tz_event_alloc()
542 void thermal_debug_tz_trip_up(struct thermal_zone_device *tz, in thermal_debug_tz_trip_up() argument
547 struct thermal_debugfs *thermal_dbg = tz->debugfs; in thermal_debug_tz_trip_up()
548 int temperature = tz->temperature; in thermal_debug_tz_trip_up()
549 int trip_id = thermal_zone_trip_id(tz, trip); in thermal_debug_tz_trip_up()
593 tze = thermal_debugfs_tz_event_alloc(tz, now); in thermal_debug_tz_trip_up()
627 void thermal_debug_tz_trip_down(struct thermal_zone_device *tz, in thermal_debug_tz_trip_down() argument
630 struct thermal_debugfs *thermal_dbg = tz->debugfs; in thermal_debug_tz_trip_down()
634 int trip_id = thermal_zone_trip_id(tz, trip); in thermal_debug_tz_trip_down()
685 void thermal_debug_update_temp(struct thermal_zone_device *tz) in thermal_debug_update_temp() argument
687 struct thermal_debugfs *thermal_dbg = tz->debugfs; in thermal_debug_update_temp()
706 tze->trip_stats[trip_id].max = max(tze->trip_stats[trip_id].max, tz->temperature); in thermal_debug_update_temp()
707 tze->trip_stats[trip_id].min = min(tze->trip_stats[trip_id].min, tz->temperature); in thermal_debug_update_temp()
709 (tz->temperature - tze->trip_stats[trip_id].avg) / in thermal_debug_update_temp()
718 struct thermal_zone_device *tz = s->private; in tze_seq_start() local
719 struct thermal_debugfs *thermal_dbg = tz->debugfs; in tze_seq_start()
729 struct thermal_zone_device *tz = s->private; in tze_seq_next() local
730 struct thermal_debugfs *thermal_dbg = tz->debugfs; in tze_seq_next()
738 struct thermal_zone_device *tz = s->private; in tze_seq_stop() local
739 struct thermal_debugfs *thermal_dbg = tz->debugfs; in tze_seq_stop()
746 struct thermal_zone_device *tz = s->private; in tze_seq_show() local
760 for_each_trip(tz, trip) { in tze_seq_show()
776 trip_id = thermal_zone_trip_id(tz, trip); in tze_seq_show()
801 void thermal_debug_tz_add(struct thermal_zone_device *tz) in thermal_debug_tz_add() argument
806 thermal_dbg = thermal_debugfs_add_id(d_tz, tz->id); in thermal_debug_tz_add()
812 tz_dbg->trips_crossed = kzalloc(sizeof(int) * tz->num_trips, GFP_KERNEL); in thermal_debug_tz_add()
820 debugfs_create_file("mitigations", 0400, thermal_dbg->d_top, tz, &tze_fops); in thermal_debug_tz_add()
822 tz->debugfs = thermal_dbg; in thermal_debug_tz_add()
825 void thermal_debug_tz_remove(struct thermal_zone_device *tz) in thermal_debug_tz_remove() argument
827 struct thermal_debugfs *thermal_dbg = tz->debugfs; in thermal_debug_tz_remove()
834 tz->debugfs = NULL; in thermal_debug_tz_remove()