STRUCT REGULATOR_INIT_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the name field 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 to regulator_init. hand it whatever your driver needs, it's a void *, 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