dev_pm_opp_find_bw_ceil(9)
β¨ dev_pm_opp_find_bw_ceil β like, the ceil bandwidth hunt π
okay so bestie, quick vibe check: this is a page from the Kernel API Manual, and it's all about dev_pm_opp_find_bw_ceil. It's giving "search for a rounded ceil bandwidth" energy and honestly? iconic. π
πΈ SYNOPSIS πΈ
struct dev_pm_opp * dev_pm_opp_find_bw_ceil (struct device *dev ,
unsigned int *bw , int index );
like, that's the whole signature, no cap. look at her go. π¦
π«Ά ARGUMENTS π«Ά
devβ the device we're doing this whole operation for, main character energy fr πbwβ the start bandwidth, that's where we begin the search π₯indexβ which bandwidth we're comparing against, for when OPPs are out here holding several values at once (iykyk) β¨
π DESCRIPTION π
So like β the way this works is you go searching for the matching floor available OPP, starting from a bandwidth, for a device. That's the whole plot. π
Important bestie note: whoever calls this has to call dev_pm_opp_put on the returned OPP after they're done using it. Not optional, okay? that's the rule. π«Ά
β RETURN β
On the good path it gives you back the matching *opp and refreshes *bw accordingly β slay. π
Otherwise it returns an ERR_PTR when there's an error, and you're supposed to handle that using IS_ERR. and the error return values can literally be:
EINVALβ for bad pointer πERANGEβ no match found for search πENODEVβ if the device isn't found in the list of registered devices π
π§ SEE ALSO π§
Kernel file ./drivers/opp/core.c and honestly a whole friend group of functions β here's the full roster, no skipping:
_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_exact(9), dev_pm_opp_find_level_ceil(9), dev_pm_opp_find_level_floor(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, bestie!! π«Άβ¨ this whole thing lives under ./drivers/opp and it's dated October 2026 β the manual is dev_pm_opp_find_bw_ceil(9), go off. πππ¦
π¦ 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