enforce_temp_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… enforce_temp_range(9) β€” like, the whole vibe

okay so bestie, welcome to enforce_temp_range(9), straight out of the Kernel API Manual πŸŽ€ this is one of those lil kernel functions that keeps your SOC_THERM from doing something unhinged with temperatures, and honestly? she's doing the most so your chip doesn't melt. iconic behavior fr fr πŸ”₯


✨ NAME ✨

enforce_temp_range β€” check and enforce temperature range [min, max] 🌑️✨

like yes, the name literally tells you what it does, no cap, she's not subtle and we love that for her πŸ’…


🌸 SYNOPSIS 🌸

int enforce_temp_range (struct device *dev , int trip_temp );

that's it. that's the whole signature. short, sweet, and about to do precision math on ur behalf 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” a struct device * for the SOC_THERM instance πŸ’– this is the device she's checking up on, main character energy tbh
  • trip_temp β€” the trip temperature to check, like the number you want her to vibe-check for you 🌈

⭐ DESCRIPTION ⭐

okay so here's the tea β˜• β€” enforce_temp_range checks and enforces the permitted temperature range that the SOC_THERM HW can actually support. like, hardware has limits, bestie, and she's gonna respect them for you.

and the way she does it? taking care of precision. not me being obsessed with a function that genuinely cares about precision 😭 that's the whole point, the clamping happens but the precision is handled too, so you don't lose millicelsius-level detail in the process ✨

no further details beyond that, that's literally the description, and honestly she said what she said πŸ’…


πŸ‘‘ RETURN πŸ‘‘

returns the precision adjusted capped temperature in millicelsius. πŸŒ‘οΈπŸŽ€ so what you get back is your temperature, already capped, already precision-adjusted, ready to go. periodt.


🧚 SEE ALSO 🧚

the kernel file lives at ./drivers/thermal/tegra/soctherm.c β€” go read bestie, iykyk πŸ“–πŸ’œ

and here's the whole friend group, every single one of them, no skipping:

like, that's the entire soctherm cinematic universe and you will be reading it πŸŒˆπŸ’€


πŸ’€ ok tiny heads-up bestie: this page is filed under ./drivers/thermal/tegra and dated October 2026, and the footer repeats enforce_temp_range(9) β€” so that's your source/version, your date, and your title all in one lil corner. don't lose them πŸŽ€

and that's the page!! go forth and be precise, you absolute icon πŸ’–πŸŒ‘οΈβœ¨ slay responsibly 🫢

πŸ“¦ where this page comes from