set_machine_constraints(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

set_machine_constraints(9) πŸ’…

from the Kernel API Manual β€” okay so bestie, this is the page for set_machine_constraints, and it's literally the regulator-constraints setup moment ✨


πŸŽ€ NAME πŸŽ€

set_machine_constraints β€” sets regulator constraints

✨ SYNOPSIS ✨

int set_machine_constraints (struct regulator_dev *rdev , bool is_locked
);

🌸 ARGUMENTS 🌸

  • rdev β€” regulator source. yes that's the struct, main character energy πŸ‘‘
  • is_locked β€” whether or not this is called with locks held already. lock vibe check 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this allows platform initialisation code to define and constrain regulator circuits β€” think valid voltage/current ranges, etc. πŸ’–

NOTE: Constraints must be set by platform code in order for some regulator operations to proceed, i.e. set_voltage, set_current_limit, set_mode. like, must must, no cap β€” some operations literally won't proceed without it 😭πŸ”₯

⭐ RETURN ⭐

0 on success or a negative error number on failure. periodt πŸ’…

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/regulator/core.c β€” and the whole regulator friend group is right here:


ok that's the whole page, bestie πŸ’– source/version ./drivers/regulator, October 2026, set_machine_constraints(9) β€” byeee 🫢✨

πŸ“¦ where this page comes from