dev_pm_opp_find_level_exact(9)
π dev_pm_opp_find_level_exact(9) β Kernel API Manual β¨
okay bestie, buckle up, because this one is from the Kernel API Manual and it's lowkey a little legend. it's called dev_pm_opp_find_level_exact and the whole vibe is: you want one specific level, you get one specific level, no games π
πΈ NAME πΈ
dev_pm_opp_find_level_exact β search for an exact level π―
β¨ SYNOPSIS β¨
struct dev_pm_opp * dev_pm_opp_find_level_exact (struct device *dev ,
unsigned int level );
that's the whole signature, no cap. two args, one pointer back π«Ά
π ARGUMENTS π
devβ the device we're doing this whole operation for. like, whose opp table are we snooping in πlevelβ the level you're searching for. exactly this one. not "close enough", not "something in the ballpark", this level π―
π¦ RETURN π¦
so it searches for an exact match in the opp table and hands you back a pointer to the matching opp if it found one. if it didn't, it returns ERR_PTR on error, and bestie you must handle that with IS_ERR. no ignoring it, fr fr π
the possible error return values are:
EINVALβ bad pointer πERANGEβ no match found for your search πENODEVβ the device wasn't found in the list of registered devices π«
no match found is literally an error here. exact means exact, she does not compromise β¨
π DESCRIPTION π
the callers are required to call dev_pm_opp_put for the returned OPP after use. yes, after use. it's giving "you borrowed my hoodie, give it back" energy π§₯π«Ά don't leave it hanging, that's how you get leaks and nobody wants that.
π SEE ALSO π
kernel file ./drivers/opp/core.c, plus the whole opp bestie squad:
_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_ceil_indexed(9)dev_pm_opp_find_freq_floor(9)dev_pm_opp_find_freq_floor_indexed(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)
β¨ reminder from your girl: exact match or nothing, handle yourERR_PTRwithIS_ERR, and alwaysdev_pm_opp_putwhen you're done. that's the vibe check and you passed π
mwah, that's a wrap π this little gem lives in ./drivers/opp, dated October 2026, and it's page dev_pm_opp_find_level_exact(9) β go forth and search exactly, bestie π¦
π¦ 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