dev_pm_opp_of_add_table(9)
π dev_pm_opp_of_add_table(9) β Kernel API Manual π
okay so bestie, welcome to the Kernel API Manual, and today's main character is dev_pm_opp_of_add_table(9) β yes she's got the manual-name energy in her title, we stan. let's get into it π
β¨ NAME β¨
dev_pm_opp_of_add_table β literally just: Initialize opp table from device tree π¦
πΈ SYNOPSIS πΈ
int dev_pm_opp_of_add_table (struct device *dev );
π ARGUMENTS π
devβ the device pointer, and it's the one we use to look up the OPP table. that's her whole job. no notes π«Ά
π₯ DESCRIPTION π₯
So what she does is: Register the initial OPP table with the OPP library for given device. that's it, that's the vibe. she takes that dev and makes the initial OPP table official with the OPP library. iconic behavior honestly π
π RETURN π
okay this is the part where you pay attention bestie, because there are so many possible returns and each one means something different. read them carefully, no skimming π
0β On success OR Duplicate OPPs (both freq and volt are same) andopp->available. so like, zero is your good-day outcome, but also sometimes dupes count as fine if they're identical on both freq and volt ANDopp->available.-EEXISTβ Freq are same and volt are different OR Duplicate OPPs (both freq and volt are same) and!opp->available. so yeah, same freq but different volt = this one. and the full-dupe-but-not-available case lands here too.-ENOMEMβ Memory allocation failure. the classic. ran out of memory, happens to the best of us π-ENODEVβ when'operating-points'property is not found or is invalid data in device node.-ENODATAβ when empty'operating-points'property is found.-EINVALβ when invalid entries are found in opp-v2 table.
ngl the return codes are doing the absolute most here, so keep this list bookmarked bestie π
π SEE ALSO π
Kernel file ./drivers/opp/of.c β hi queen, we see you β¨
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_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)dev_pm_opp_of_register_em(9)
like, the whole friend group showed up for this one π literally the opp squad fr fr.
and that's the whole page bestie!! mwah π
this little manual page lives in ./drivers/opp, it's dated October 2026, and it's part of the Kernel API Manual β so when you're flipping through the manual and see her again, you'll know. slay, periodt, 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