of_regulator_bulk_get_all(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 with regulator_bulk_free and free the array itself with kfree. 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:


and that's the page!! πŸ’œ from ./drivers/regulator, dated October 2026 β€” mwah, slay, go free your regulators responsibly πŸ§šβ€β™€οΈπŸŽ€

πŸ“¦ where this page comes from