dev_pm_opp_of_register_em(9)
β¨ 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 nglcpusβ the CPUs we're registering an Energy Model for π but heads up: for any other type of device, this one should be set toNULLβ no cap, justNULLπ
π 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:
- the kernel file
./drivers/opp/of.cπ (yes, that's where the magic lives) dev_pm_opp_of_remove_table(9)_opp_add_static_v2(9)devm_pm_opp_of_add_table(9)dev_pm_opp_of_add_table(9)dev_pm_opp_of_add_table_indexed(9)devm_pm_opp_of_add_table_indexed(9)dev_pm_opp_of_cpumask_remove_table(9)dev_pm_opp_of_cpumask_add_table(9)dev_pm_opp_of_get_sharing_cpus(9)of_get_required_opp_performance_state(9)dev_pm_opp_of_has_required_opp(9)dev_pm_opp_get_of_node(9)dev_pm_opp_calc_power(9)
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
- 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