gpiochip_fw...et_direction(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so bestie, welcome to the gpiochip_fw...et_direction(9) page in the Kernel API Manual β€” header line folded in near the top, cute style only πŸ’…. The function is gpiochip_fwd_gpio_get_direction, and it does exactly one iconic thing: Return the current direction of a GPIO forwarder line. periodt.

πŸ¦‹ SYNOPSIS πŸ¦‹

here's the signature, copied exactly so ur not guessing:

int gpiochip_fwd_gpio_get_direction (struct gpiochip_fwd *fwd , unsigned
       int offset );

πŸŽ€ ARGUMENTS πŸŽ€

  • fwd β€” GPIO forwarder. literally the forwarder, bestie.
  • offset β€” the offset of the line. that's the line offset, no cap.

πŸ”₯ RETURN πŸ”₯

vibe check: 0 for output, 1 for input, or an error code in case of error. so 0 is output energy, 1 is input energy, and an error code means something went off 😭.

🌈 SEE ALSO 🌈

Kernel file ./drivers/gpio/gpio-aggregator.c β€” that's the source file, iykyk.

the see-also squad, all present and iconic:


sign-off szn 🫢: source/version is ./drivers/gpio, date is October 2026, and the page is gpiochip_fw...et_direction(9). mwah, bestie πŸ’–βœ¨

πŸ“¦ where this page comes from