dev_pm_opp_enable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dev_pm_opp_enable β€” Kernel API Manual, bestie edition πŸŽ€

okay so this is <hotpink>dev_pm_opp_enable(9)</hotpink> straight out of the Kernel API Manual, and it's literally the "un-ghost" button for an OPP. Let me walk you through it, no cap.


✨ NAME ✨

dev_pm_opp_enable β€” bestie, it's giving "Enable a specific OPP". that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

int dev_pm_opp_enable (struct device *dev , unsigned long freq );

two arguments, one int back, she's lowkey simple and that's the point. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the struct device we're doing this whole operation for. like, who are we enabling an OPP for? this one. main character device energy. πŸ‘‘
  • freq β€” the OPP frequency you wanna enable. that's the one coming back from its little hiatus. ✨

πŸ’– DESCRIPTION πŸ’–

so the way this works: dev_pm_opp_enable enables a provided OPP. if the operation is valid, it returns 0 β€” slay. otherwise you get the corresponding error value back, which is your vibe check saying "nope." 😭

the tea is that this function is meant to be used for users to make an OPP available again after it got temporarily made unavailable with dev_pm_opp_disable. so it's literally the reunion arc. dev_pm_opp_disable said "you're off the table for a sec," and dev_pm_opp_enable says "bestie, come back, we miss you." 🫢

no cap, this is the temporary unavailability route β€” read it as the partner-in-crime of dev_pm_opp_disable, not some brand-new OPP being born. πŸ’€

πŸ”₯ RETURN πŸ”₯

here's the receipts on what she hands back:

  • -EINVAL β€” for bad pointers πŸ™ˆ (you passed her something cursed, she's not doing that)
  • -ENOMEM β€” if no memory is available for the copy operation 😭
  • 0 β€” if no modification was done OR the modification was successful. iconic either way. ⭐

πŸ¦‹ SEE ALSO πŸ¦‹

the whole group chat, fr fr. Kernel file: ./drivers/opp/core.c


and that's the whole page, bestie β€” go enable some OPPs responsibly πŸ’œ

source/path: ./drivers/opp · date: October 2026 · that's the sign-off, mwah 🧚✨

πŸ“¦ where this page comes from