_opp_add_static_v2(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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) and opp->available OR 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:


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