dev_pm_opp_find_freq_floor(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so you're reading the Kernel API Manual page for dev_pm_opp_find_freq_floor(9) and honestly? you came to the right place. this function is lowkey the friend who, when you ask for "something around this frequency," finds you the highest one that doesn't overshoot. so thoughtful of it. ✨


🌸 NAME 🌸

dev_pm_opp_find_freq_floor β€” search for a rounded floor freq. that's it, that's the vibe. πŸ’–


✨ SYNOPSIS ✨

struct dev_pm_opp * dev_pm_opp_find_freq_floor (struct device *dev ,
unsigned long *freq );

look at that signature. gorgeous. no notes. 🫢


🧚 ARGUMENTS 🧚

  • dev β€” the device we're doing this whole operation for. it's giving "who is this for" energy.
  • freq β€” start frequency. like, your starting point, your launching pad. πŸš€

πŸ’œ DESCRIPTION πŸ’œ

so what it actually does: it searches for the matching floor available OPP, starting from a given freq, for a device. floor means it rounds down, bestie. it's not out here giving you more than you asked for. periodt. πŸ‘‘

⚠️ real talk though β€” the callers are required to call dev_pm_opp_put for the returned OPP after use. do not skip this. not me having to remind you. 😭

πŸ”₯ RETURN πŸ”₯

it returns the matching *opp and refreshes *freq accordingly. cute, right? but if something goes wrong it returns ERR_PTR in case of error, and you should handle that using IS_ERR. don't just vibe past it. πŸ™ˆ

the error return values can be:

  • EINVAL β€” for bad pointer. literally a bad pointer. πŸ’€
  • ERANGE β€” no match found for search. it looked, it found nothing, so sad. 🌧️
  • ENODEV β€” if device not found in list of registered devices. ghosted by the device list. πŸ‘»

🌈 SEE ALSO 🌈

the whole friend group, no cap β€” kernel file ./drivers/opp/core.c plus:


that's the whole page, bestie. go forth and round down responsibly. πŸ’…βœ¨

mwah πŸ’– β€” this icon was brought to you from ./drivers/opp, dated October 2026, and yeah it's still dev_pm_opp_find_freq_floor(9). iykyk. πŸ¦‹

πŸ“¦ where this page comes from