_find_opp_table(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… _find_opp_table(9) β€” like, the Kernel API Manual era πŸŽ€

okay so bestie, welcome to _find_opp_table(9), straight out of the Kernel API Manual and honestly? it's a whole vibe. this one's a tiny little lookup function but it's got main character energy in the OPP world, fr fr. let's get into it ✨


🌸 NAME 🌸

_find_opp_table β€” find the opp_table struct using a device pointer 🫢

✨ SYNOPSIS ✨

struct opp_table * _find_opp_table (struct device *dev );

like yes, that's it, that's the whole signature πŸ’… one arg, one return, no drama.

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the device pointer you're using to look up the OPP table. that's your little search key, bestie πŸ”‘

πŸ’– DESCRIPTION πŸ’–

so what it does: it searches the OPP table for the one that contains a matching device. like a little scavenger hunt but for OPP tables and the prize is the one that matches your dev 🌈

⚠️ okay this part is IMPORTANT, no cap: the callers must call dev_pm_opp_put_opp_table after the table is used. don't just grab the table and ghost it 😭 that's not the move.

πŸ‘‘ RETURN πŸ‘‘

pointer to 'struct opp_table' if found β€” slay, you got it πŸ’…

otherwise you get -ENODEV or -EINVAL, depending on the type of error. so like, read the error code, it's telling you which kind of no you got πŸ™ˆ

🧚 SEE ALSO 🧚

Kernel file ./drivers/opp/core.c, plus this whole friend group of OPP functions (we love a supportive cast 🫢):


and that's the whole page, bestie, we ate and left no crumbs πŸ“

mwah πŸ’‹ β€” this little page lives in ./drivers/opp, dated October 2026, and it said _find_opp_table(9) at the top and the bottom, iconic bookends honestly ✨

πŸ“¦ where this page comes from