STRUCT GPIO_V2_LINE_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay bestie, so this little cutie lives in the Kernel API Manual (the (9) section, iykyk), and honestly? She's the whole personality of one single GPIO line. Like, everything you could possibly want to know about one pin: her name, who's using her, where she sits, what her flags are. Main character energy fr fr 🌈


✨ NAME ✨

struct gpio_v2_line_info β€” literally just Information about a certain GPIO line πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct gpio_v2_line_info {
    char name[GPIO_MAX_NAME_SIZE];
    char consumer[GPIO_MAX_NAME_SIZE];
    __u32 offset;
    __u32 num_attrs;
    __aligned_u64 flags;
    struct gpio_v2_line_attribute attrs[GPIO_V2_LINE_NUM_ATTRS_MAX];
    __u32 padding[4];
 };

no cap, that's the whole struct. let's go field by field πŸ’–


🌸 Members 🌸

  • name β€” the name of this GPIO line, bestie. like the output pin of the line on the chip, or a rail, or a pin header name on a board β€” whatever the GPIO chip decided to call her. she may be empty, i.e. name[0] == ' ' 🫢
  • consumer β€” a functional name for whoever is consuming this GPIO line, set by whatever is using it. she'll be empty if there's no current user… but also lowkey may be empty if the consumer just never set this up πŸ™ˆ (yes, both. don't come for her.)
  • offset β€” the local offset on this GPIO chip. you literally fill this in yourself when you're requesting the line information from the kernel. that's your job, not hers πŸ’…
  • num_attrs β€” the number of attributes in attrs. keeping count, icon behaviour πŸ‘‘
  • flags β€” flags for this GPIO line, with values from enum gpio_v2_line_flag, such as GPIO_V2_LINE_FLAG_ACTIVE_LOW, GPIO_V2_LINE_FLAG_OUTPUT etc, added together. stacking them like accessories ✨
  • attrs β€” the configuration attributes associated with the line. her little accessory collection πŸŽ€
  • padding β€” reserved for future use. she's saving space for future her, we love a forward-thinking queen 🧚

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/uapi/linux/gpio.h, plus the whole friend group β€” go say hi:

  • struct gpiochip_info(9)
  • enum gpio_v2_line_flag(9)
  • struct gpio_v2_line_values(9)
  • enum gpio_v2_line_attr_id(9)
  • struct gpio_v2_line_attribute(9)
  • struct gpio_v2_line_config_attribute(9)
  • struct gpio_v2_line_config(9)
  • struct gpio_v2_line_request(9)
  • enum gpio_v2_line_changed_type(9)
  • struct gpio_v2_line_info_changed(9)
  • enum gpio_v2_line_event_id(9)
  • struct gpio_v2_line_event(9)
  • struct gpioline_info(9)
  • struct gpioline_info_changed(9)
  • struct gpiohandle_request(9)
  • struct gpiohandle_config(9)
  • struct gpiohandle_data(9)
  • struct gpioevent_request(9)
  • struct gpioevent_data(9)

okay that's the whole page, no notes πŸ’€βœ¨ this came straight out of ./include/uapi/linux and it's dated October 2026 β€” so yeah, she's from the future, we stan a time-travelling manpage πŸ‘‘πŸ¦‹ bye bestie, go poke some pins responsibly πŸ’–

πŸ“¦ where this page comes from