STRUCT GPIO_V2_LINE_VALUES(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct gpio_v2_line_values(9) β€” like, the whole Kernel API Manual vibe ✨

okay so bestie, we're in the Kernel API Manual today and this one is a tiny little struct that does so much. it's giving "small but mighty" fr fr. it's struct gpio_v2_line_values and it's literally just the values of GPIO lines. that's it. that's the whole thing. and honestly? iconic. πŸŽ€


🌸 NAME 🌸

struct gpio_v2_line_values β€” the values of GPIO lines, no cap πŸ’–


✨ SYNOPSIS ✨

here's the whole shape of it, bestie β€” copy it exactly, don't be weird about it:

struct gpio_v2_line_values {
    __aligned_u64 bits;
    __aligned_u64 mask;
 };

two __aligned_u64 fields. that's the entire struct. she's compact, she's aligned, she's serving exactly what she needs to serve. πŸ’…


πŸ¦‹ Members πŸ¦‹

  • bits β€” a bitmap holding the value of the lines. set a bit to 1 for active and 0 for inactive. that's the actual data, the main character of the struct honestly πŸ‘‘
  • mask β€” a bitmap that says which lines you're getting or setting. each bit number corresponds to the index into struct gpio_v2_line_request.offsets β€” so like, bit 0 = the first offset, bit 1 = the second one, and on and on. it's the guest list, and bits is what happens to everyone who made it past the rope 🫢
ngl the whole thing only makes sense as a pair: mask picks the lines, bits tells you their values. don't @ me.

πŸ”₯ SEE ALSO πŸ”₯

so many friends, so many (9)s. go read these, iykyk:

  • Kernel file ./include/uapi/linux/gpio.h
  • struct gpiochip_info(9)
  • enum gpio_v2_line_flag(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)
  • struct gpio_v2_line_info(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)

like, the whole gpio extended universe is in here. a crossover event. 🌈


and that's the page, bestie! this lil' entry lives in ./include/uapi/linux and the version stamp says October 2026, under the title struct gpio_v2_line_values(9) β€” so if anyone asks, you heard it from me first. mwah πŸ’œπŸ§šβ­

πŸ“¦ where this page comes from