STRUCT REGULATOR_INIT_DATA(9)
π struct regulator_init_data(9) π
okay so this is from the Kernel API Manual and it's literally all about struct regulator_init_data β the platform initialisation data for a regulator. yes bestie, we're doing kernel regulator lore today, buckle up π
β¨ NAME β¨
struct regulator_init_data β regulator platform initialisation data. that's it, that's the vibe. it's the little bundle of setup info you hand the kernel so your regulator knows what it is and who it's feeding π«Ά
β¨ SYNOPSIS β¨
struct regulator_init_data {
const char *supply_regulator;
struct regulation_constraints constraints;
int num_consumer_supplies;
struct regulator_consumer_supply *consumer_supplies;
void *driver_data;
};
look at her. five fields. absolutely iconic structure honestly πΈ
β¨ Members β¨
supply_regulatorβ the parent regulator, i.e. who supplies this one. you specify it using the regulator name exactly as it shows up in thenamefield in sysfs β and yes, that name can be explicitly set using the constraints field'name'. so there's a little name moment going on, iykyk π«constraintsβ the Constraints. these must be specified for the regulator to be usable. not optional, not a suggestion, it's giving mandatory. no constraints, no regulator, periodt π₯num_consumer_suppliesβ how many consumer device supplies there are. just a count, bestie. a lil int πconsumer_suppliesβ the actual consumer device supply configuration. this is where the consumers get their supply glow-up β¨driver_dataβ data that gets passed toregulator_init. hand it whatever your driver needs, it's avoid *, go wild (responsibly) π¦
β¨ Description β¨
Initialisation constraints, our supply and consumers supplies. that's the whole deal β the constraints, the supply, and the consumer supplies, all chilling together in one struct π
β¨ SEE ALSO β¨
- Kernel file
./include/linux/regulator/machine.h struct regulator_state(9)struct regulation_constraints(9)struct regulator_consumer_supply(9)
go read those too, they're all in the same friend group fr fr π
okay that's the whole page, you ate that, bestie π§π
this lil masterpiece lives at ./include/linux/regulator and it's dated October 2026 β so mark your calendar, struct regulator_init_data(9) is coming for you π
β
π¦ 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