gpiod_get_ra...lue_cansleep(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay so bestie, this is the gpiod_get_ra...lue_cansleep(9) page from the Kernel API Manual β€” aka the full-function moment for gpiod_get_raw_array_value_cansleep(9), and it's literally about reading raw values from an array of GPIOs. Slay. ✨

✨ SYNOPSIS ✨

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

That's the signature, no cap. πŸ‘‘

πŸŽ€ ARGUMENTS πŸŽ€

  • array_size β€” number of elements in the descriptor array / value bitmap. It's giving "how many are we working with," bestie.
  • desc_array β€” array of GPIO descriptors whose values will be read. These are the little icons we're checking.
  • array_info β€” information on applicability of fast bitmap processing path. Yes, the fast-path tea. ⚑
  • value_bitmap β€” bitmap to store the read values. This is where the results go, periodt.

πŸ¦‹ DESCRIPTION πŸ¦‹

So this function reads the raw values of the GPIOs β€” i.e. the values of the physical lines, without regard for their ACTIVE_LOW status. Raw is raw, bestie; the physical line is the main character here. πŸ’…

This function is to be called from contexts that can sleep. That's the whole cansleep vibe β€” it's allowed to snooze. 😴

πŸ”₯ RETURN πŸ”₯

It returns 0 on success, or a negative errno on failure. That's the whole story. No mystery, no drama. πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./drivers/gpio/gpiolib.c is the home base mentioned here, and these are all the related icons you can go read next β€” not me listing the whole friend group:

Cute sign-off: this page comes from source/version ./drivers/gpio, dated October 2026 β€” and yes, it's still serving Kernel API Manual energy. Bye bestie! πŸ’–βœ¨

πŸ“¦ where this page comes from