STRUCT TZ_DEBUGFS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct tz_debugfs(9) β€” like, the Kernel API Manual edition πŸŽ€

okay bestie, buckle up ✨ this is a page straight out of the Kernel API Manual, and it's all about a lil struct that's out here keeping receipts on thermal zones. it's giving "notes app but make it kernel" and honestly? we're obsessed.


🌸 NAME 🌸

struct tz_debugfs β€” stores all the mitigation episodes for a thermal zone. yes, all of them. no cap, she remembers everything πŸ’…


✨ SYNOPSIS ✨

struct tz_debugfs {
    struct list_head tz_episodes;
    struct thermal_zone_device *tz;
    int *trips_crossed;
    int nr_trips;
 };

look at her. four members. flawless. no notes 🫢


πŸ¦‹ Members πŸ¦‹

  • tz_episodes β€” a list of thermal mitigation episodes. literally the whole history, main character energy only.
  • tz β€” the thermal zone this object belongs to. it's her zone, she's just living in it.
  • trips_crossed β€” an array of trip points crossed, by id. think of it as a little attendance sheet for trip points πŸ“‹
  • nr_trips β€” the number of trip points currently being crossed. the headcount, if you will.

πŸ”₯ Description πŸ”₯

so the tz_debugfs structure contains the list of the mitigation episodes, and it has to track which trip point has been crossed so it can correctly handle nested trip point mitigation episodes. yes bestie, nesting. like russian dolls but thermal πŸ’€

we keep the history of the trip point crossed in an array, and β€” because we can totally go back and forth inside that history, e.g. trip 0,1,2,1,2,1,0 β€” we also keep track of the current position in the history array. it's a vibe check for your trips, iykyk ⭐

lowkey the whole point: the array holds the history, and the position pointer keeps you oriented while you're out here yo-yoing through it. don't lose your place, bestie πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/thermal/thermal_debugfs.c plus these iconic lil friends:

go read them. slay. periodt πŸ’œ


and that's the whole page, bestie β€” brought to you by ./drivers/thermal, dated October 2026, filed under struct tz_debugfs(9). mwah πŸ’‹πŸŒˆ

πŸ“¦ where this page comes from