dev_pm_opp_find_freq_ceil(9)
π dev_pm_opp_find_freq_ceil β Kernel API Manual β¨
okay so bestie, welcome to the group chat about dev_pm_opp_find_freq_ceil(9), which lives in the Kernel API Manual and is genuinely one of those lil functions that's lowkey iconic once you get it π
πΈ NAME πΈ
dev_pm_opp_find_freq_ceil β search for a rounded ceil freq
like, it's giving "find me the next frequency up from here" energy, and honestly? we love that for us π
β¨ SYNOPSIS β¨
struct dev_pm_opp * dev_pm_opp_find_freq_ceil (struct device *dev ,
unsigned long *freq );
no cap, that's the whole vibe right there β you hand it a device and a pointer to a frequency, it goes looking π¦
π ARGUMENTS π
devβ the device we're doing this whole operation for. main character device energy, fr fr πfreqβ the start frequency. this is where the search kicks off π«
π DESCRIPTION π
so basically, it searches for the matching ceil available OPP, starting from a given freq, for a device. the "ceil" is doing a lot of work here β we're rounding up, bestie, not down π
ok important psa: the callers are required to call dev_pm_opp_put for the returned OPP after use. do NOT forget this. it's literally the number one thing. put it back. put it back bestie ππ
π RETURN π
it gives you the matching *opp and refreshes *freq accordingly β¨ β but if something goes sideways it returns ERR_PTR instead, in case of error, and you should handle that using IS_ERR. no skipping the vibe check on that one π«Ά
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 π§
kernel file ./drivers/opp/core.c and honestly the whole friend group:
_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_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 β go forth and ceil responsibly πβ¨
sign-off time π«Ά this lil manpage comes from ./drivers/opp, dated October 2026, and it's the dev_pm_opp_find_freq_ceil(9) page in the Kernel API Manual. ily, drink water, 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