regulator_se...limit_regmap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… regulator_set_current_limit_regmap β€” NAME (yes i'm doing the name section, it's iconic)

okay so hi bestie 🌸 this one's called regulator_set_current_limit_regmap and it's literally the set_current_limit helper made specifically for the regmap girlies. no cap.

this page lives in the Kernel API Manual, in case you were wondering where you wandered into πŸŽ€


✨ SYNOPSIS ✨

int regulator_set_current_limit_regmap(struct regulator_dev *rdev, int min_uA, int max_uA);

it gives you back an int, bestie. that's the whole vibe.


🫢 ARGUMENTS 🫢

  • rdev β€” the regulator you're operating on. the main character, basically πŸ‘‘
  • min_uA β€” the lower bound for the current limit. the floor, the bare minimum, we've all been there 😭
  • max_uA β€” the upper bound for the current limit. the ceiling. set your boundaries fr fr ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea πŸ“ β€” regulators that use regmap for their register I/O can just set the curr_table, csel_reg and csel_mask fields in their descriptor, and then use this function as their set_current_limit operation. that's it. that's the whole thing. it saves you some code, which is lowkey the best gift anyone can give you πŸ’–

three fields, one function pointer, zero drama. slay.

no cap: you gotta set all three β€” curr_table, csel_reg and csel_mask β€” in the descriptor first. this function isn't out here guessing your register layout, she's just doing the regmap steps πŸ’…

🌈 SEE ALSO 🌈

the kernel file this lives in: ./drivers/regulator/helpers.c β€” go read it, it's giving source of truth πŸ“–

and the whole friend group, in order, no one left out:

like a whole group chat of regmap helpers and you just walked in πŸ’€πŸ§š


aaaand that's the page!! πŸŽ€ this one ships out of ./drivers/regulator and the date on it is October 2026 β€” so yeah, mark your calendar, she's from the future (or at least the footer is) ⭐ bye bestie, go set some current limits responsibly πŸ’œ

πŸ“¦ where this page comes from