devm_regulator_bulk_get(9)
π devm_regulator_bulk_get(9) β like, the whole vibe β¨
okay so bestie, welcome to the Kernel API Manual π this one's called devm_regulator_bulk_get, and it is literally the group-chat way to grab a bunch of regulator consumers all at once. no cap. sit down, hydrate, let's go π
β¨ NAME β¨
devm_regulator_bulk_get β managed get multiple regulator consumers π«Ά
like, "managed" is the main character word here, remember it.
πΈ SYNOPSIS πΈ
int devm_regulator_bulk_get (struct device *dev , int num_consumers ,
struct regulator_bulk_data *consumers );
that's the whole signature, bestie, don't let the line break scare you π¦
π ARGUMENTS π
devβ the device to supply. yeah. the device. it's giving "who's the parent here" energy.num_consumersβ number of consumers to register. count them. all of them. πconsumersβ configuration of consumers; clients are stored here. so this thing goes in, and the actual clients get plopped inside it. your little storage bin π
π₯ DESCRIPTION π₯
return 0 on success, a negative error number on failure. that's it, that's the contract, periodt.
This helper function allows drivers to get several regulator consumers in one operation with management, and the regulators will automatically be freed when the device is unbound. yes bestie, automatically β¨ you don't have to clean up, the devres machinery has your back, it's giving fiercely responsible π§
β οΈ ok but listen β if any of the regulators cannot be acquired, then any regulators that were allocated will be freed before returning to the caller. so it unwinds itself. all-or-nothing. the way that it refuses to leave you with half a mess π iconic behavior honestly.
π SEE ALSO π
Kernel file ./drivers/regulator/devres.c β plus the whole extended friend group, fr fr:
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_exclusive(9)devm_regulator_bulk_get_const(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)
and that's the page π go forth and bulk-get your regulators, bestie, you're gonna slay π
mwah π β brought to you from ./drivers/regulator, dated October 2026, which is genuinely so soon, like, time is a construct fr fr β
π¦ 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