STRUCT GPIO_ARRAY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct gpio_array β€” the Kernel API Manual tea, bestie

okay so real talk, this page is about struct gpio_array, and the man page literally calls it an opaque descriptor for a structure of GPIO array attributes. Which like... sounds scary but it's just a little container that holds a bunch of GPIO descriptors together, iykyk πŸŽ€


✨ SYNOPSIS ✨

struct gpio_array {
    struct gpio_desc        **desc;
    unsigned int            size;
    struct gpio_device      *gdev;
    unsigned long           *get_mask;
    unsigned long           *set_mask;
    unsigned long           invert_mask[];
 };

look at her, living her best struct life 🌸


🫢 Members (aka the cast of characters)

  • desc β€” an array of pointers to the GPIO descriptors, the whole girl gang πŸ’–
  • size β€” how many elements are actually chillin' in desc
  • gdev β€” the parent GPIO device, the mom friend of the group
  • get_mask β€” the get mask used in the fastpath ⚑
  • set_mask β€” the set mask used in the fastpath ⚑
  • invert_mask β€” the invert mask used in the fastpath ⚑ (this one's literally an array of unsigned long, no size given up front, she's mysterious πŸ’…)

πŸ‘‘ Description

so this structure gets attached to struct gpiod_descs that you got from gpiod_get_array, and then you can pass it right back into the get/set array functions so you can activate the fast processing path if it applies. like, if it's applicable. no cap. πŸ”₯

basically: grab your array, hand it back, and if the fastpath fits, she goes zoom ✨

ngl the whole point is speed, but only "if applicable" β€” so don't go assuming it's always doing the fast thing πŸ™ˆ

🌈 SEE ALSO

  • Kernel file ./drivers/gpio/gpiolib.h
  • struct gpio_device(9)
  • struct gpio_desc(9)

that's the whole page bestie, slay πŸ’œ

signed, sealed, delivered β€” straight from ./drivers/gpio, dated October 2026, and she's the struct gpio_array(9) page herself. periodt. πŸ¦‹

πŸ“¦ where this page comes from