gpiod_get_raw_array_value(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ gpiod_get_raw_array_value β€” the manual page, but make it make sense ✨

okay so bestie, this one's from the Kernel API Manual and honestly? it's lowkey iconic. it's a kernel function that reads the raw values off a whole array of GPIOs at once. yes, an array. we love a multitasker πŸ’…


πŸŽ€ NAME πŸŽ€

gpiod_get_raw_array_value β€” read raw values from an array of GPIOs. that's the whole vibe: plural GPIOs, plural values, one function call. slay.


✨ SYNOPSIS ✨

int gpiod_get_raw_array_value (unsigned int array_size , struct
gpio_desc **desc_array , struct gpio_array *array_info , unsigned long
*value_bitmap );

that's the signature, character for character, don't @ me. 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • array_size β€” how many elements live in the descriptor array / value bitmap. basically the headcount, fr fr.
  • desc_array β€” the array of GPIO descriptors whose values are gonna get read. this is the squad. πŸ‘‘
  • array_info β€” info about whether the fast bitmap processing path is applicable. it's giving "are we doing this the quick way or not".
  • value_bitmap β€” the bitmap where the read values get stored. this is where the tea gets written down. πŸ’–

🌸 DESCRIPTION 🌸

so what does it actually do. it reads the raw values of the GPIOs β€” and by raw we mean the values of the physical lines, without regard for their ACTIVE_LOW status. like, we're not translating anything, we're not flipping bits for polarity, we're just reporting what's literally on the wire. no cap. ⚑

and here's the important bit: this function can be called from contexts where we cannot sleep, and it will complain if the GPIO chip functions potentially sleep. so if you're in an atomic context and the chip tries to nap? it's gonna call you out. 😭

πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • negative errno on failure πŸ’€

that's it. that's the whole return contract.


🌈 SEE ALSO 🌈

okay this list is long β€” like, main character energy long β€” but every single one is here, bestie, because we don't skip entries in this house. the kernel file is ./drivers/gpio/gpiolib.c.


and that's the page, bestie πŸ’œ go read your arrays, respect the ACTIVE_LOW caveat, and don't sleep in an atomic context.

this one came from the source/version tag ./drivers/gpio, dated October 2026 β€” that's the sign-off, mwah πŸ’‹

πŸ“¦ where this page comes from