Lines Matching refs:trip_stats

100 struct trip_stats {  struct
131 struct trip_stats trip_stats[]; member
562 tze = kzalloc(struct_size(tze, trip_stats, tz->num_trips), GFP_KERNEL); in thermal_debugfs_tz_event_alloc()
572 tze->trip_stats[i].trip_temp = THERMAL_TEMP_INVALID; in thermal_debugfs_tz_event_alloc()
573 tze->trip_stats[i].min = INT_MAX; in thermal_debugfs_tz_event_alloc()
585 struct trip_stats *trip_stats; in thermal_debug_tz_trip_up() local
653 trip_stats = &tze->trip_stats[trip_id]; in thermal_debug_tz_trip_up()
654 trip_stats->trip_temp = trip->temperature; in thermal_debug_tz_trip_up()
655 trip_stats->trip_hyst = trip->hysteresis; in thermal_debug_tz_trip_up()
656 trip_stats->timestamp = now; in thermal_debug_tz_trip_up()
664 struct trip_stats *trip_stats = &tze->trip_stats[trip_id]; in tz_episode_close_trip() local
665 ktime_t delta = ktime_sub(now, trip_stats->timestamp); in tz_episode_close_trip()
667 trip_stats->duration = ktime_add(delta, trip_stats->duration); in tz_episode_close_trip()
669 trip_stats->timestamp = KTIME_MAX; in tz_episode_close_trip()
751 struct trip_stats *trip_stats = &tze->trip_stats[trip_id]; in thermal_debug_update_trip_stats() local
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()
755 ++trip_stats->count; in thermal_debug_update_trip_stats()
814 struct trip_stats *trip_stats; in tze_seq_show() local
825 trip_stats = &tze->trip_stats[trip_id]; in tze_seq_show()
828 if (trip_stats->trip_temp == THERMAL_TEMP_INVALID) in tze_seq_show()
831 if (trip_stats->timestamp != KTIME_MAX) { in tze_seq_show()
834 trip_stats->timestamp); in tze_seq_show()
836 delta = ktime_add(delta, trip_stats->duration); in tze_seq_show()
840 duration_ms = ktime_to_ms(trip_stats->duration); in tze_seq_show()
847 9, trip_stats->trip_temp, in tze_seq_show()
848 9, trip_stats->trip_hyst, in tze_seq_show()
850 9, trip_stats->avg, in tze_seq_show()
851 9, trip_stats->min); in tze_seq_show()