of_devfreq_...gister_power(9)
π of_devfreq_cooling_register_power β a Kernel API Manual moment β¨
okay so bestie, welcome to the Kernel API Manual entry for of_devfreq_cooling_register_power(9) and honestly? it's giving "thermal management but make it OF-aware and power-literate" π«Ά lock in, this one's actually so useful.
πΈ NAME πΈ
of_devfreq_cooling_register_power β registers a devfreq cooling device, with OF and power information. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
struct thermal_cooling_device * of_devfreq_cooling_register_power
(struct device_node *np , struct devfreq *df , struct
devfreq_cooling_power *dfc_power );
like, it hands you back a struct thermal_cooling_device * and takes three pointers. iconic signature tbh π
π ARGUMENTS π
npβ pointer to the OFdevice_node. the device-tree representation, the whole "where do i live in the tree" situation π³dfβ pointer to thedevfreqdevice. this is your actual devfreq buddy that's getting cooled πdfc_powerβ pointer to adevfreq_cooling_power. the power-info plug, if you're plugging one in π
π₯ DESCRIPTION π₯
so the whole point: this registers a devfreq cooling device. that's the main character energy right there β¨
β οΈ heads up bestie: the available OPPs must be registered on the device. like, non-negotiable. no OPPs registered = no vibes.
now, if dfc_power is provided (like, you actually passed something in), the cooling device gets registered with the power extensions πͺ cute. but β and this is the part you cannot skip β
for the power extensions to work correctly,devfreqshould use thesimple_ondemandgovernor. other governors are not currently supported. periodt. don't come crying to me when you swap governors and it acts up π
π¦ SEE ALSO π¦
lowkey go read these too, they're the friend group π«Ά
- Kernel file
./drivers/thermal/devfreq_cooling.c struct devfreq_cooling_device(9)get_perf_idx(9)devfreq_cooling_gen_tables(9)of_devfreq_cooling_register(9)devfreq_cooling_register(9)devfreq_cooling_em_register(9)devfreq_cooling_unregister(9)
aaaand that's the page!! π this one lives under ./drivers/thermal, dated October 2026, and it's part of the Kernel API Manual β of course it is π
mwah, go register some cooling devices responsibly, ily, bye ππβ
π¦ 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