dev_pm_opp_find_key_exact(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– dev_pm_opp_find_key_exact πŸ’–

okay bestie so this is a page from the Kernel API Manual and it's literally all about dev_pm_opp_find_key_exact β€” searching an OPP table for a key set that matches exactly. no fuzzy vibes, no approximation, exact only. periodt. ✨


🌸 NAME 🌸

dev_pm_opp_find_key_exact β€” search for an OPP with an exact key set 🎯


πŸ¦‹ SYNOPSIS πŸ¦‹

struct dev_pm_opp * dev_pm_opp_find_key_exact (struct device *dev ,
struct dev_pm_opp_key *key , bool available );

three args, one return, zero excuses. slay. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device you're hunting the OPP for 🫢
  • key β€” the OPP key set you want to match, like exactly exactly
  • available β€” true/false β€” whether you're matching for an available OPP or not πŸ‘‘

✨ DESCRIPTION ✨

So what it does is: it searches for an exact match of the key set in the OPP table. that's it, that's the whole vibe check. no cap. πŸ’–


πŸ”₯ RETURN πŸ”₯

A matching opp on success β€” yay πŸŽ‰ β€” otherwise you get an ERR_PTR in case of error 😭. The possible error values are:

  • EINVAL β€” for bad pointers πŸ™ˆ
  • ERANGE β€” no match found for the search πŸ’€
  • ENODEV β€” if the device isn't found in the list of registered devices 🧚

πŸ€” NOTE πŸ€”

So the deal is: then the match is for an exact matching key and is available in the stored OPP table. If false, the match is for an exact key which is not available. 🌈

This gives you a whole mechanism to enable an OPP that isn't available currently β€” or the opposite as well. iconic behaviour honestly. ⭐

⚠️ listen bestie, important: callers are required to call dev_pm_opp_put for the returned OPP after use. don't forget, or it's giving leak energy πŸ˜­πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/opp/core.c plus this whole friend group right here:


and that's the whole page bestie!! πŸ’œ this one lives in ./drivers/opp, it's from October 2026, and it's part of the Kernel API Manual β€” go forth and match those keys exactly, ily, bye πŸ«ΆπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from