dev_pm_opp_of_register_em(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ dev_pm_opp_of_register_em ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– this one's a little function from the kernel, and honestly? it's giving "small but mighty." let's get into it 🫢


🌸 NAME 🌸

dev_pm_opp_of_register_em β€” the "hey, let's try to register an Energy Model" girlie πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int dev_pm_opp_of_register_em (struct device *dev , struct cpumask *cpus );

like, it returns an int, it takes a struct device *dev and a struct cpumask *cpus, and that's the whole vibe ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device we wanna register an Energy Model for πŸ‘‘ this is the main character of the call ngl
  • cpus β€” the CPUs we're registering an Energy Model for πŸ’– but heads up: for any other type of device, this one should be set to NULL β€” no cap, just NULL πŸ™ˆ

πŸ“ DESCRIPTION πŸ“

so what does it actually do? it checks whether the "dynamic-power-coefficient" devicetree property has been specified πŸ‘€ and if it has, it tries to register an Energy Model with it. that's it, that's the job πŸ’…

and why do we care? because having this property means the voltages are known for OPPs, and the EM might be calculated πŸ”₯ iykyk β€” no property, no voltages known, no EM math happening. periodt.


🌈 SEE ALSO 🌈

bestie, the guest list is LONG and everyone's invited πŸ’€ all of these are worth a peek:

like, that's a whole friend group right there πŸ§šπŸ’œ


reminder bestie: this is straight from the ./drivers/opp crew, October 2026 edition of the Kernel API Manual β€” go read the source if you want the deep lore, ok? πŸ’–βœ¨ slay and stay curious πŸ¦‹
πŸ“¦ where this page comes from