dev_pm_opp_of_add_table(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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) and opp->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 AND opp->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 ✨

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