dev_pm_opp_f...xact_indexed(9)
π
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 wantindexβ the clock index, iykykavailableβ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:
_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_ceil(9)dev_pm_opp_find_freq_ceil_indexed(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)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms