STRUCT REGULATOR_CONFIG(9)
π struct regulator_config(9) π
okay bestie, welcome to the Kernel API Manual β this is the page for struct regulator_config, and it's lowkey the glow-up page for Dynamic regulator descriptor. yes, that's the NAME. slay.
β¨ SYNOPSIS β¨
like, here's the whole struct, exactly as it lives, no cap:
struct regulator_config {
struct device *dev;
const struct regulator_init_data *init_data;
void *driver_data;
struct device_node *of_node;
struct regmap *regmap;
struct gpio_desc *ena_gpiod;
};
she's compact, she's iconic, she's six fields of main character energy. π
π¦ Members π¦
okay so let's meet the cast, one by one:
devβ thestruct devicefor the regulator. the home address, the vibe check, the whole identity. πinit_dataβ platform provided init data, passed through by driver. it's giving "handed down from above," and we respect it. β¨driver_dataβ private regulator data. that's your stuff, bestie, nobody else's business. πof_nodeβ OpenFirmware node to parse for device tree bindings (may beNULL). yes, she can beNULL, and that's valid, don't panic. πΈregmapβ regmap to use for core regmap helpers ifdev_get_regmapis insufficient. the backup plan that absolutely eats. π₯ena_gpiodβ GPIO controlling regulator enable. the little on/off switch with big responsibilities. β
π Description π
so the way this works: each regulator registered with the core is described with a structure of this type and a struct regulator_desc. two structs, one destiny, iykyk. π«Ά
this structure contains the runtime variable parts of the regulator description β the stuff that changes at runtime while struct regulator_desc handles the rest. lowkey a perfect little division of labour. π
π SEE ALSO π
go read these next, bestie, they're all in the kernel file ./include/linux/regulator/driver.h:
struct regulator_ops(9)struct regulator_desc(9)struct regulator_err_state(9)struct regulator_irq_data(9)struct regulator_irq_desc(9)
ok real talk β this page came out of ./include/linux/regulator, it's dated October 2026, and it's part of the Kernel API Manual. mwah, that's the sign-off. periodt. ππ
π¦ 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