gpiod_hwgpio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the gpiod_hwgpio(9) page from the Kernel API Manual βœ¨πŸ¦‹ this one is short and sweet, and it is literally about getting the GPIO number relative to the chip πŸ’…

πŸŽ€ NAME πŸŽ€

gpiod_hwgpio β€” return the GPIO number of the passed descriptor relative to its chip 🫢

✨ SYNOPSIS ✨

int gpiod_hwgpio (const struct gpio_desc *desc );

πŸ’… ARGUMENTS πŸ’…

  • desc β€” the GPIO descriptor 🌸

🌈 RETURN 🌈

you get back the hardware offset of the GPIO represented by the descriptor ✨ periodt, that's the return value πŸ’–

πŸ”₯ SEE ALSO πŸ”₯

okay so the kernel file on deck is ./drivers/gpio/gpiolib.c, and here is the whole friend group, no cap πŸ‘‘

mwah, bestie πŸ’‹ β€” source/version: ./drivers/gpio Β· date: October 2026 Β· page: gpiod_hwgpio(9) πŸŽ€

πŸ“¦ where this page comes from