STRUCT GPIO_REGULATOR_CONFIG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct gpio_regulator_config(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for struct gpio_regulator_config β€” yes that's the real title, the header up there gets truncated to struct gpio_...lator_config(9) because even the manpage renderer runs out of breath 🫢


✨ NAME ✨

struct gpio_regulator_config β€” the config structure. that's it, that's the whole name. it's giving "I contain multitudes but my name is literally just config structure" πŸ’€


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole struct, copied exactly, no cap:

struct gpio_regulator_config {
    const char *supply_name;
    const char *input_supply;
    unsigned enabled_at_boot:1;
    unsigned startup_delay;
    enum gpiod_flags *gflags;
    int ngpios;
    struct gpio_regulator_state *states;
    int nr_states;
    enum regulator_type type;
    struct regulator_init_data *init_data;
 };

look at her. ten whole members. main character energy fr fr πŸ‘‘


πŸŽ€ Members πŸŽ€

supply_name

Name of the regulator supply. that's her name, that's her whole identity ✨

input_supply

Name of the input regulator supply. the supply that feeds the supply, iykyk 🌸

enabled_at_boot

Whether the regulator has been enabled at boot or not. 1 = Yes, 0 = No. this is used to keep the regulator at the default state πŸ’–

ngl this one is a 1-bit field so it's living its best tiny life. be nice to her.

startup_delay

Start-up time in microseconds. literally the "give me a sec" of the regulator world 😭

gflags

Array of GPIO configuration flags for initial states. plural flags, plural states, we love an array πŸ¦‹

ngpios

Number of GPIOs and configurations available. count 'em, bestie πŸ”₯

states

Array of gpio_regulator_state entries describing the gpio state for specific voltages. this is where the voltage-to-gpio lore lives πŸ‘‘

nr_states

Number of states available. the states array said "how many of me are there" and this field answered πŸ’…

init_data

regulator_init_data. that's the whole description. short, sweet, iconic, no notes πŸŽ€


🌈 Description 🌈

okay so this structure contains gpio-voltage regulator configuration information that must be passed by platform code to the gpio-voltage regulator driver. must. not "should", not "maybe if you feel like it" β€” the platform code has to hand it over, periodt 🌟

think of it as the little care package 🎁 that platform code packs up so the gpio-voltage regulator driver knows what it's working with. without it the driver is just standing there like 🧍


⭐ SEE ALSO ⭐

  • Kernel file ./include/linux/regulator/gpio-regulator.h
  • struct gpio_regulator_state(9) β€” go read her too, she's the other half of this story πŸ’œ

and that's the whole vibe check, bestie 🫢 this page came from ./include/linux/regulator, dated October 2026, and the footer still insists on calling her struct gpio_...lator_config(9) β€” we stan a consistent queen πŸ’…βœ¨

πŸ“¦ where this page comes from