for_each_req...pio_in_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… for_each_requested_gpio_in_range β€” Kernel API Manual (yes that's the manual name, we're fancy)

okay so bestie, picture this: you've got a range of GPIOs and you only care about the ones that somebody actually requested. This thing iterates over requested GPIOs in a given range πŸŽ€ That's it. That's the whole vibe. No cap.

It's literally the iterator your for-loop dreams are made of ✨


✨ SYNOPSIS ✨

for_each_requested_gpio_in_range (_chip , _i , _base , _size , _label );

(the spaces are exactly like that, don't @ me, copy it verbatim or it won't compile πŸ”₯)


🌸 ARGUMENTS 🌸

  • _chip β€” the chip to query 🫢 like, which chip are we even talking to here
  • _i β€” the loop variable πŸ’« your classic i, doing main character energy work
  • _base β€” first GPIO in the range ⭐ where the party starts
  • _size β€” amount of GPIOs to check starting from _base πŸŽ€ so it's _base onward, _size of them, got it
  • _label β€” label of current GPIO πŸ¦‹ the little name tag so you know which one you're looking at

every single one of those args gets passed in exactly as written, underscore and all β€” they're the macro's own names, not placeholders for you to rename πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

like, go read these next, they're iconic:


and that's the whole page, bestie 🌈 mwah πŸ’‹

This absolute gem comes to you from ./include/linux/gpio, dated October 2026 β€” periodt, that's the sign-off, go touch some hardware πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from