dev_pm_opp_...ceil_indexed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– dev_pm_opp_...ceil_indexed(9) πŸ’–

okay bestie, welcome to the Kernel API Manual ✨ this is the page for dev_pm_opp_find_freq_ceil_indexed(9) and honestly? it's giving "find me the next frequency up, but, like, for this specific clock" energy. let's get into it πŸŽ€


✨ NAME ✨

dev_pm_opp_find_freq_ceil_indexed β€” search for a rounded ceil freq for the clock corresponding to the index πŸ’…

like yes, it's a long name. no, we're not shortening it. it's iconic.


🌈 SYNOPSIS 🌈

struct dev_pm_opp * dev_pm_opp_find_freq_ceil_indexed (struct device
*dev , unsigned long *freq , u32 index );

three args, one pointer returned, zero chill πŸ¦‹


🫢 ARGUMENTS 🫢

  • dev β€” the Device we're doing this whole operation for 🧚
  • freq β€” the Start frequency, bestie. that's your launch point.
  • index β€” the Clock index πŸ’« (which clock we're talking about, iykyk)

πŸ’œ DESCRIPTION πŸ’œ

so what does it actually do? it searches for the matching ceil available OPP for the clock that corresponds to the specified index β€” starting from a starting freq, for a device 🌸

"ceil" means we round up, not down. we're reaching for the stars, not the floor. ⭐

⚠️ real talk: the callers are required to call dev_pm_opp_put for the returned OPP after use. yes, required. this is not a suggestion, this is the vibe check. if you don't put it back, that's not slay, that's a leak 😭

πŸ”₯ RETURN πŸ”₯

it returns the matching *opp and refreshes *freq accordingly ✨ β€” cute, right? it updates your freq pointer as a little treat πŸŽ€

otherwise it returns ERR_PTR in case of error, and you should handle that using IS_ERR. no cap, always check it. πŸ™ˆ

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 🫠

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group πŸ’– (kernel file ./drivers/opp/core.c):

_find_opp_table(9), dev_pm_opp_get_bw(9), dev_pm_opp_get_voltage(9), dev_pm_opp_get_supplies(9), dev_pm_opp_get_power(9), dev_pm_opp_get_freq_indexed(9), dev_pm_opp_get_level(9), dev_pm_opp_get_required_pstate(9), dev_pm_opp_is_turbo(9), dev_pm_opp_get_max_clock_latency(9), dev_pm_opp_get_max_volt_latency(9), dev_pm_opp_get_max_transition_latency(9), dev_pm_opp_get_suspend_opp_freq(9), dev_pm_opp_get_opp_count(9), dev_pm_opp_find_freq_exact(9), dev_pm_opp_find_key_exact(9), dev_pm_opp_find_freq_exact_indexed(9), dev_pm_opp_find_freq_ceil(9), dev_pm_opp_find_freq_floor(9), dev_pm_opp_find_freq_floor_indexed(9), dev_pm_opp_find_level_exact(9), dev_pm_opp_find_level_ceil(9), dev_pm_opp_find_level_floor(9), dev_pm_opp_find_bw_ceil(9), dev_pm_opp_find_bw_floor(9), dev_pm_opp_set_rate(9), dev_pm_opp_set_opp(9), dev_pm_opp_remove(9), dev_pm_opp_remove_all_dynamic(9), _opp_add_v1(9), dev_pm_opp_set_config(9), dev_pm_opp_clear_config(9), devm_pm_opp_set_config(9), dev_pm_opp_xlate_required_opp(9), dev_pm_opp_xlate_performance_state(9), dev_pm_opp_add_dynamic(9), _opp_set_availability(9), dev_pm_opp_adjust_voltage(9), dev_pm_opp_sync_regulators(9), dev_pm_opp_enable(9), dev_pm_opp_disable(9), dev_pm_opp_register_notifier(9), dev_pm_opp_unregister_notifier(9), dev_pm_opp_remove_table(9)

like, that's the entire squad. go say hi. 🫢


aaaaand that's the page!! πŸ’… this whole thing lives in ./drivers/opp, dated October 2026, and it's filed under dev_pm_opp_...ceil_indexed(9) in the Kernel API Manual. stay hydrated, put your OPPs back, and don't forget your IS_ERR check πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from