STRUCT GPIO_V2_LINE_INFO(9)
π 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 inattrs. keeping count, icon behaviour πflagsβ flags for this GPIO line, with values fromenum gpio_v2_line_flag, such asGPIO_V2_LINE_FLAG_ACTIVE_LOW,GPIO_V2_LINE_FLAG_OUTPUTetc, 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
- 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