dev_pm_opp_add_dynamic(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– dev_pm_opp_add_dynamic β€” NAME πŸ’–

okay bestie, gather round: dev_pm_opp_add_dynamic is literally the "Add an OPP table from a table definitions" girlie πŸ’… (and yes, this is the Kernel API Manual, we're in the big leagues now πŸŽ€).


✨ SYNOPSIS ✨

int dev_pm_opp_add_dynamic (struct device *dev , struct dev_pm_opp_data
*data );

🫢 ARGUMENTS 🫢

  • dev β€” the device we're doing this whole operation for. main character energy, lowkey πŸ¦‹
  • data β€” the OPP data for the OPP we're adding. the actual payload, no cap πŸ’œ

🌸 DESCRIPTION 🌸

so this function adds an opp definition to the opp table and returns status β€” that's the whole vibe fr fr ✨

the opp is made available by default (iconic, it just shows up ready to go πŸ‘‘), and you can control it using the dev_pm_opp_enable / dev_pm_opp_disable functions. that's your remote control, bestie πŸŽ€


πŸ”₯ RETURN πŸ”₯

  • 0 β€” On success OR Duplicate OPPs (both freq and volt are same) and opp->available πŸ’–
  • -EEXIST β€” Freq are same and volt are different OR Duplicate OPPs (both freq and volt are same) and !opp->available πŸ’€
  • -ENOMEM β€” Memory allocation failure 😭 (the classic "ran out of room" moment, we've all been there)

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, in the kernel file ./drivers/opp/core.c 🌈

_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_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), _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) 🧚


ngl that's a lot of siblings, but every single one of them is in the group chat πŸ’…

okay that's the page!! this one's from ./drivers/opp, dated October 2026, and it's dev_pm_opp_add_dynamic(9) β€” go forth and add those OPPs, bestie, you're gonna slay πŸŒŸπŸ’–πŸ“

πŸ“¦ where this page comes from