gpiochip_fw...et_direction(9)
β¨ 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:
gpiochip_fwd_get_gpiochip(9)gpiochip_fwd_get_data(9)gpiochip_fwd_gpio_request(9)gpiochip_fwd_gpio_direction_output(9)gpiochip_fwd_gpio_direction_input(9)gpiochip_fwd_gpio_get(9)gpiochip_fwd_gpio_get_multiple(9)gpiochip_fwd_gpio_set(9)gpiochip_fwd_gpio_set_multiple(9)gpiochip_fwd_gpio_set_config(9)gpiochip_fwd_gpio_to_irq(9)devm_gpiochip_fwd_alloc(9)gpiochip_fwd_desc_add(9)gpiochip_fwd_desc_free(9)gpiochip_fwd_register(9)gpiochip_fwd_create(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms