Lines Matching refs:tz_dbg
174 struct tz_debugfs tz_dbg; member
586 struct tz_debugfs *tz_dbg; in thermal_debug_tz_trip_up() local
592 tz_dbg = &thermal_dbg->tz_dbg; in thermal_debug_tz_trip_up()
629 if (!tz_dbg->nr_trips) { in thermal_debug_tz_trip_up()
634 list_add(&tze->node, &tz_dbg->tz_episodes); in thermal_debug_tz_trip_up()
650 tz_dbg->trips_crossed[tz_dbg->nr_trips++] = trip_id; in thermal_debug_tz_trip_up()
652 tze = list_first_entry(&tz_dbg->tz_episodes, struct tz_episode, node); in thermal_debug_tz_trip_up()
679 struct tz_debugfs *tz_dbg; in thermal_debug_tz_trip_down() local
685 tz_dbg = &thermal_dbg->tz_dbg; in thermal_debug_tz_trip_down()
696 if (!tz_dbg->nr_trips) in thermal_debug_tz_trip_down()
699 for (i = tz_dbg->nr_trips - 1; i >= 0; i--) { in thermal_debug_tz_trip_down()
700 if (tz_dbg->trips_crossed[i] == trip_id) in thermal_debug_tz_trip_down()
707 tz_dbg->nr_trips--; in thermal_debug_tz_trip_down()
709 if (i < tz_dbg->nr_trips) in thermal_debug_tz_trip_down()
710 tz_dbg->trips_crossed[i] = tz_dbg->trips_crossed[tz_dbg->nr_trips]; in thermal_debug_tz_trip_down()
712 tze = list_first_entry(&tz_dbg->tz_episodes, struct tz_episode, node); in thermal_debug_tz_trip_down()
720 if (!tz_dbg->nr_trips) in thermal_debug_tz_trip_down()
730 struct tz_debugfs *tz_dbg; in thermal_debug_update_trip_stats() local
737 tz_dbg = &thermal_dbg->tz_dbg; in thermal_debug_update_trip_stats()
741 if (!tz_dbg->nr_trips) in thermal_debug_update_trip_stats()
744 tze = list_first_entry(&tz_dbg->tz_episodes, struct tz_episode, node); in thermal_debug_update_trip_stats()
749 for (i = 0; i < tz_dbg->nr_trips; i++) { in thermal_debug_update_trip_stats()
750 int trip_id = tz_dbg->trips_crossed[i]; in thermal_debug_update_trip_stats()
764 struct tz_debugfs *tz_dbg = &thermal_dbg->tz_dbg; in tze_seq_start() local
768 return seq_list_start(&tz_dbg->tz_episodes, *pos); in tze_seq_start()
774 struct tz_debugfs *tz_dbg = &thermal_dbg->tz_dbg; in tze_seq_next() local
776 return seq_list_next(v, &tz_dbg->tz_episodes, pos); in tze_seq_next()
789 struct thermal_zone_device *tz = thermal_dbg->tz_dbg.tz; in tze_seq_show()
869 struct tz_debugfs *tz_dbg; in thermal_debug_tz_add() local
875 tz_dbg = &thermal_dbg->tz_dbg; in thermal_debug_tz_add()
877 tz_dbg->tz = tz; in thermal_debug_tz_add()
879 tz_dbg->trips_crossed = kcalloc(tz->num_trips, sizeof(int), GFP_KERNEL); in thermal_debug_tz_add()
880 if (!tz_dbg->trips_crossed) { in thermal_debug_tz_add()
885 INIT_LIST_HEAD(&tz_dbg->tz_episodes); in thermal_debug_tz_add()
910 struct tz_debugfs *tz_dbg; in thermal_debug_tz_remove() local
917 tz_dbg = &thermal_dbg->tz_dbg; in thermal_debug_tz_remove()
921 trips_crossed = tz_dbg->trips_crossed; in thermal_debug_tz_remove()
923 list_for_each_entry_safe(tze, tmp, &tz_dbg->tz_episodes, node) { in thermal_debug_tz_remove()
938 struct tz_debugfs *tz_dbg; in thermal_debug_tz_resume() local
947 tz_dbg = &thermal_dbg->tz_dbg; in thermal_debug_tz_resume()
949 if (!tz_dbg->nr_trips) in thermal_debug_tz_resume()
957 tze = list_first_entry(&tz_dbg->tz_episodes, struct tz_episode, node); in thermal_debug_tz_resume()
959 for (i = 0; i < tz_dbg->nr_trips; i++) in thermal_debug_tz_resume()
960 tz_episode_close_trip(tze, tz_dbg->trips_crossed[i], now); in thermal_debug_tz_resume()
964 tz_dbg->nr_trips = 0; in thermal_debug_tz_resume()