STRUCT GPIO_ARRAY(9)
π 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' indescgdevβ the parent GPIO device, the mom friend of the groupget_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 ofunsigned 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
- 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