_find_opp_table(9)
π _find_opp_table(9) β like, the Kernel API Manual era π
okay so bestie, welcome to _find_opp_table(9), straight out of the Kernel API Manual and honestly? it's a whole vibe. this one's a tiny little lookup function but it's got main character energy in the OPP world, fr fr. let's get into it β¨
πΈ NAME πΈ
_find_opp_table β find the opp_table struct using a device pointer π«Ά
β¨ SYNOPSIS β¨
struct opp_table * _find_opp_table (struct device *dev );
like yes, that's it, that's the whole signature π one arg, one return, no drama.
π¦ ARGUMENTS π¦
devβ the device pointer you're using to look up the OPP table. that's your little search key, bestie π
π DESCRIPTION π
so what it does: it searches the OPP table for the one that contains a matching device. like a little scavenger hunt but for OPP tables and the prize is the one that matches your dev π
β οΈ okay this part is IMPORTANT, no cap: the callers must call dev_pm_opp_put_opp_table after the table is used. don't just grab the table and ghost it π that's not the move.
π RETURN π
pointer to 'struct opp_table' if found β slay, you got it π
otherwise you get -ENODEV or -EINVAL, depending on the type of error. so like, read the error code, it's telling you which kind of no you got π
π§ SEE ALSO π§
Kernel file ./drivers/opp/core.c, plus this whole friend group of OPP functions (we love a supportive cast π«Ά):
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_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 whole page, bestie, we ate and left no crumbs π
mwah π β this little page lives in ./drivers/opp, dated October 2026, and it said _find_opp_table(9) at the top and the bottom, iconic bookends honestly β¨
π¦ 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