regulator_ge...sel_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… regulator_get_hardware_vsel_register β€” Kernel API Manual ✨

okay so bestie, welcome to regulator_get_hardware_vsel_register(9) πŸ’– this is from the Kernel API Manual, and it's literally the glow-up page for finding out where the hardware keeps its voltage selector. buckle up πŸŽ€


🌸 NAME 🌸

regulator_get_hardware_vsel_register β€” get the HW voltage selector register πŸ‘‘


✨ SYNOPSIS ✨

int regulator_get_hardware_vsel_register (struct regulator *regulator ,
unsigned *vsel_reg , unsigned *vsel_mask );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • regulator β€” the regulator source, aka who we're asking πŸ‘€
  • vsel_reg β€” voltage selector register, and bestie this is an output parameter πŸ’«
  • vsel_mask β€” mask for the voltage selector bitfield, also an output parameter πŸŽ€

πŸ’œ DESCRIPTION πŸ’œ

So what this does is returns the hardware register offset and the bitmask that get used for setting the regulator voltage ✨ and honestly? iconic. this is highkey useful when you're configuring voltage-scaling hardware or firmware that can make I2C requests behind the kernel's back β€” yes, behind its back, sneaky little main character energy πŸ™ˆ

On success, the output parameters vsel_reg and vsel_mask get filled in, and 0 is returned 🌈 otherwise you get a negative error number back, and that's the vibe check failing ngl 😭


⭐ RETURN ⭐

0 on success 🫢 or -EOPNOTSUPP if the regulator does not support voltage selectors πŸ’€ like, it's just not that girl, no cap.


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/regulator/core.c β€” and the whole friend group πŸ’…:


ok that's the whole page bestie, go read the source and slay πŸ’…

and that's a wrap, babe πŸŽ€ this one came straight from ./drivers/regulator, dated October 2026 β€” the manual name again for the girlies keeping receipts: regulator_ge...sel_register(9) βœ¨πŸ’– go off, and remember: no cap, read your regulator docs πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from