dev_pm_opp_f...xact_indexed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dev_pm_opp_find_freq_exact_indexed β€” Kernel API Manual ✨

okay so this one is from the Kernel API Manual bestie, and the function name is so long the header had to abbreviate it (dev_pm_opp_f...xact_indexed(9)) 😭 but we're gonna say the whole thing, we're not scared of it.


🌸 NAME 🌸

dev_pm_opp_find_freq_exact_indexed β€” search for an exact freq for the clock corresponding to the index. yes that's it. that's the whole job. and honestly? she ate. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

struct dev_pm_opp * dev_pm_opp_find_freq_exact_indexed (struct device
*dev , unsigned long freq , u32 index , bool available );

four arguments, no cap. let's meet them πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device we're doing this whole operation for 🫢
  • freq β€” the frequency you're searching for, like, the actual number you want
  • index β€” the clock index, iykyk
  • available β€” true/false β€” you're matching for an available opp. literally just that. pick one.

🧚 DESCRIPTION 🧚

So the way that this works is: it searches for the matching exact OPP for the clock that corresponds to the specified index, from a starting freq, for a device. exact means exact, bestie β€” no rounding, no "close enough", no ✨vibes✨. this is not a ceil situation and it is not a floor situation. 🎯

⚠️ real talk tho: callers are required to call dev_pm_opp_put for the returned OPP after use. like, you took it, you give it back. that's the rule. don't leave it hanging. πŸ™ˆ

⭐ RETURN ⭐

On success you get the matching *opp back πŸ’–

Otherwise it returns ERR_PTR in case of error, and you gotta handle that with IS_ERR. the error return values can be:

  • EINVAL β€” for bad pointer πŸ’€
  • ERANGE β€” no match found for search 😭
  • ENODEV β€” if device not found in list of registered devices πŸ‘»

so basically: check your pointers, check your range, check your device list. vibe check your whole life before you call this fr fr.


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/opp/core.c plus a whole group chat of friends β€” no seriously, this list is long, but every single one of them is invited:


and that's the page!! πŸ’… it lives in ./drivers/opp, it's dated October 2026, and it's brought to you by the very same Kernel API Manual we shouted out at the top πŸŽ€πŸ¦‹βœ¨ go forth and match your freqs exactly, bestie β€” and don't forget dev_pm_opp_put πŸ’–

πŸ“¦ where this page comes from