gpiod_get_array(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, this is gpiod_get_array(9) from the Kernel API Manual β€” the page for grabbing a whole squad of GPIOs at once, like a group-chat invite for pins 🫢✨

gpiod_get_array β€” obtain multiple GPIOs from a multi-index GPIO function. it's giving "one function, many descriptors" energy πŸ’…


✨ SYNOPSIS ✨

struct gpio_descs * gpiod_get_array (struct device *dev , const char
       *con_id , enum gpiod_flags flags );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the GPIO consumer 🫢 can be NULL for system-global GPIOs.
  • con_id β€” the function within the GPIO consumer ✨
  • flags β€” optional GPIO initialization flags πŸŽ€

🌸 DESCRIPTION 🌸

This function acquires all the GPIOs defined under a given function. not me showing up with one function and leaving with the entire GPIO squad πŸ˜­πŸ’…


πŸ¦‹ RETURN πŸ¦‹

you get back the GPIO descriptors corresponding to the function con_id of device dev ✨

if no GPIO has been assigned to the requested function, it's -ENOENT 😭

or you get another IS_ERR code if an error occurred while trying to acquire the GPIOs πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

Kernel file first, bestie: ./drivers/gpio/gpiolib.c 🧚 then the whole reference friend group:


source/version: ./drivers/gpio Β· date: October 2026 β€” that's the cute little footer sign-off, bestie; now go acquire your GPIO array and slay πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from