_opp_add_static_v2(9)
π NAME π
okay so bestie, meet _opp_add_static_v2 from the Kernel API Manual, section 9. its whole thing? Allocate static OPPs (As per 'v2' DT bindings). iconic, no cap. π¦
β¨ SYNOPSIS β¨
struct dev_pm_opp * _opp_add_static_v2 (struct opp_table *opp_table ,
struct device *dev , struct device_node *np );
π ARGUMENTS π
opp_tableβ the OPP table. that's the vibe container.devβ the device we do this operation for. main character device energy.npβ the device node. yes, that node.
π DESCRIPTION π
so this function adds an opp definition to the opp table and gives you back status. the opp can be controlled using dev_pm_opp_enable/disable, and it may be removed by dev_pm_opp_remove. slay. π
π₯ RETURN π₯
return vibe check, bestie:
- Valid OPP pointer β on success. periodt.
NULLβ Duplicate OPPs (both freq and volt are same) andopp->availableOR if the OPP is not supported by hardware.ERR_PTR(-EEXIST)β Freq are same and volt are different OR Duplicate OPPs (both freq and volt are same) and!opp->available.ERR_PTR(-ENOMEM)β Memory allocation failure.ERR_PTR(-EINVAL)β Failed parsing the OPP node.
π SEE ALSO π
Kernel file ./drivers/opp/of.c and these besties:
dev_pm_opp_of_remove_table(9)devm_pm_opp_of_add_table(9)dev_pm_opp_of_add_table(9)dev_pm_opp_of_add_table_indexed(9)devm_pm_opp_of_add_table_indexed(9)dev_pm_opp_of_cpumask_remove_table(9)dev_pm_opp_of_cpumask_add_table(9)dev_pm_opp_of_get_sharing_cpus(9)of_get_required_opp_performance_state(9)dev_pm_opp_of_has_required_opp(9)dev_pm_opp_get_of_node(9)dev_pm_opp_calc_power(9)dev_pm_opp_of_register_em(9)
okay bye bestie! this page lives under ./drivers/opp and is dated October 2026 β catch you in the Kernel API Manual, section 9! πβ¨
π¦ 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