devfreq_cooling_em_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… devfreq_cooling_em_register(9) β€” from the Kernel API Manual, bestie ✨

okay so real talk, this is the manpage for devfreq_cooling_em_register, straight out of the Kernel API Manual, and it's lowkey one of the most useful little functions ever. let's get into it 🫢


✨ NAME ✨

devfreq_cooling_em_register β€” register a devfreq cooling device with power info AND automatically register an Energy Model (EM). she does BOTH. multitasking icon πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct thermal_cooling_device * devfreq_cooling_em_register (struct
devfreq *df , struct devfreq_cooling_power *dfc_power );

like, look at that return type. a whole struct thermal_cooling_device *. main character energy fr fr πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • df β€” pointer to the devfreq device. yes, the devfreq one. that's the vibe.
  • dfc_power β€” pointer to devfreq_cooling_power. that's it, that's the arg 🌸

πŸ’– DESCRIPTION πŸ’–

so what she actually does: registers a devfreq cooling device and automatically registers the EM. two for one, no cap ✨

heads up bestie β€” the available OPPs must be registered for the device. non-negotiable. register your OPPs first, periodt.

if dfc_power is provided, the cooling device gets registered with the power extensions. it's using the simple Energy Model, which requires "dynamic-power-coefficient", a devicetree property. iykyk 🧚

and here's the cute part β€” to not break drivers that miss that DT property, the function won't bail out when the EM registration failed. nope, she's forgiving like that. the cooling device will still get registered if everything else is OK. iconic behaviour honestly πŸ’œ


🌈 SEE ALSO 🌈

go read them. all of them. obsessed πŸ”₯


anyway that's the whole page, mwah πŸ’‹ this came from ./drivers/thermal, dated October 2026, and it's devfreq_cooling_em_register(9) β€” go forth and register your cooling devices bestie, you're gonna slay πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from