devm_regula...lk_get_const(9)
π devm_regula...lk_get_const(9) β Kernel API Manual, bestie edition
okay so this is a page straight out of the Kernel API Manual and it's genuinely so useful once it clicks. the name got truncated in the header (devm_regula...lk_get_const(9)) β that's just the terminal being dramatic and running out of room, the real function is devm_regulator_bulk_get_const π
β¨ NAME β¨
devm_regulator_bulk_get_const β literally just devm_regulator_bulk_get() but with const data π
πΈ SYNOPSIS πΈ
int devm_regulator_bulk_get_const (struct device *dev , int
num_consumers , const struct regulator_bulk_data *in_consumers , struct
regulator_bulk_data **out_consumers );
π¦ ARGUMENTS π¦
devβ the device you're supplying, bestie. that's who gets the regulators.num_consumersβ how many consumers you're registering. a number. count them.in_consumersβ the const configuration of consumers. this is the static const one, keep reading πout_consumersβin_consumersgets copied here, and this is what gets passed todevm_regulator_bulk_get. so it's giving middleman, but like, a necessary one.
β DESCRIPTION β
this is a convenience function, and it's iconic for exactly one reason: it lets your bulk regulator configuration live as "static const" in files. no cap. that's the whole vibe β static const config, out of the way, done π«Ά
π₯ RETURN π₯
0 on success π β or a negative error number on failure π
π SEE ALSO π
Kernel file ./drivers/regulator/devres.c β and also the whole friend group:
devm_regulator_get(9)devm_regulator_get_exclusive(9)devm_regulator_get_enable_optional(9)devm_regulator_get_enable(9)devm_regulator_get_optional(9)devm_regulator_get_enable_read_voltage(9)devm_regulator_put(9)devm_regulator_bulk_get(9)devm_regulator_bulk_get_exclusive(9)devm_regulator_bulk_put(9)devm_regulator_bulk_get_enable(9)devm_regulator_register(9)devm_regulator_register_supply_alias(9)devm_regulator_bulk_register_supply_alias(9)devm_regulator_register_notifier(9)devm_regulator_unregister_notifier(9)devm_regulator_irq_helper(9)devm_of_regulator_get(9)devm_of_regulator_get_optional(9)
ok that's the whole page, go forth and register your bulk consumers π β¨
and that's a wrap, mwah π β this one lives in ./drivers/regulator, dated October 2026, and the header it goes by is devm_regula...lk_get_const(9). iykyk π§π
π¦ 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