of_regulator_bulk_get_all(9)
π of_regulator_bulk_get_all(9) π
okay so bestie, welcome to the Kernel API Manual β this is the page for of_regulator_bulk_get_all, and honestly it's giving "grab the whole squad at once" energy. no cap.
β¨ NAME β¨
of_regulator_bulk_get_all β get multiple regulator consumers π«Ά
like, multiple. in one go. we love efficiency.
πΈ SYNOPSIS πΈ
int of_regulator_bulk_get_all (struct device *dev , struct device_node
*np , struct regulator_bulk_data **consumers );
three args, one function call, a whole array of regulators. yes diva π
π ARGUMENTS π
devβ the Device to supply. it's the main character here, obviously.npβ device node to search for consumers in. this is where we go looking πconsumersβ Configuration of consumers; clients are stored here. yes, the results get dropped in here for you π
π¦ DESCRIPTION π¦
so here's the vibe: this helper function lets drivers get several regulator consumers in one operation. no more doing it one at a time like a peasant, fr fr. β¨
but listen, because this is the important part π β if any of the regulators cannot be acquired, then any regulators that were allocated will be freed before returning to the caller, and consumers will not be changed. so it's all-or-nothing, bestie. no half-finished situationships here π
π¨ okay so pay attention to this one: on success, the array is allocated here and handed to the caller, which owns it from then on. that means you are responsible for it now. release the regulators withregulator_bulk_freeand free the array itself withkfree. and the supply names live in the same allocation, so they are gone once the array is freed. like, really gone. no notes, just facts π«Ά
β RETURN β
Number of regulators on success π β or a negative error number on failure π
π SEE ALSO π
the kernel file lives right here, iykyk:
- Kernel file
./drivers/regulator/of_regulator.c
and the whole friend group:
of_get_regulator_init_data(9)of_regulator_match(9)of_get_child_regulator(9)of_get_regulator(9)of_regulator_dev_lookup(9)of_regulator_get(9)of_regulator_get_optional(9)of_check_coupling_data(9)of_parse_coupled_regulator(9)
and that's the page!! π from ./drivers/regulator, dated October 2026 β mwah, slay, go free your regulators 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