regulator_se...limit_regmap(9)
π 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_regandcsel_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:
regulator_is_enabled_regmap(9)regulator_enable_regmap(9)regulator_disable_regmap(9)regulator_get_voltage_sel_pickable_regmap(9)regulator_set_voltage_sel_pickable_regmap(9)regulator_get_voltage_sel_regmap(9)regulator_set_voltage_sel_regmap(9)regulator_map_voltage_iterate(9)regulator_map_voltage_ascend(9)regulator_map_voltage_linear(9)regulator_map_voltage_linear_range(9)regulator_map_voltage_pickable_linear_range(9)regulator_desc_list_voltage_linear(9)regulator_list_voltage_linear(9)regulator_list_voltage_pickable_linear_range(9)regulator_desc_list_voltage_linear_range(9)regulator_list_voltage_linear_range(9)regulator_list_voltage_table(9)regulator_set_bypass_regmap(9)regulator_set_soft_start_regmap(9)regulator_set_pull_down_regmap(9)regulator_get_bypass_regmap(9)regulator_set_active_discharge_regmap(9)regulator_get_current_limit_regmap(9)regulator_bulk_set_supply_names(9)regulator_is_equal(9)regulator_find_closest_bigger(9)regulator_set_ramp_delay_regmap(9)
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
- 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