enforce_temp_range(9)
π 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β astruct device *for the SOC_THERM instance π this is the device she's checking up on, main character energy tbhtrip_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:
ccroc_writel(9)ccroc_readl(9)thermtrip_program(9)throttrip_program(9)tegra_soctherm_set_hwtrips(9)soctherm_thermal_isr_thread(9)soctherm_oc_intr_enable(9)soctherm_handle_alarm(9)soctherm_edp_isr_thread(9)soctherm_edp_isr(9)soctherm_oc_irq_lock(9)soctherm_oc_irq_sync_unlock(9)soctherm_oc_irq_enable(9)soctherm_oc_irq_disable(9)soctherm_oc_irq_map(9)soctherm_irq_domain_xlate_twocell(9)soctherm_oc_int_init(9)soctherm_init_hw_throt_cdev(9)throttlectl_cpu_level_cfg(9)throttlectl_cpu_level_select(9)throttlectl_cpu_mn(9)throttlectl_gpu_level_select(9)soctherm_throttle_program(9)
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/tegraand dated October 2026, and the footer repeatsenforce_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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms