gpiochip_fwd_create(9)
π gpiochip_fwd_create β a kernel API manual moment
okay so bestie, welcome to the gpiochip_fwd_create(9) page, straight out of the Kernel API Manual β¨ this is the one that makes a whole new GPIO forwarder appear out of thin air (well, out of descriptors), and honestly? it's giving main character energy π
πΈ NAME πΈ
gpiochip_fwd_create β Create a new GPIO forwarder π¦
β¨ SYNOPSIS β¨
struct gpiochip_fwd * gpiochip_fwd_create (struct device *dev , unsigned
int ngpios , struct gpio_desc *descs[] , unsigned long features );
like, that's the whole signature, no cap π
π ARGUMENTS π
devβ the parent device pointer π«Ά that's her parent, respect her.ngpiosβ the number of GPIOs in the forwarder. literally how many she's carrying.descsβ array containing the GPIO descriptors to forward to. this array must containngpiosentries, and here's the cute part: you can deallocate it afterwards, because the forwarder has its own array π₯ she's independent, she doesn't need you anymore.featuresβ bitwise ORed features, as defined withFWD_FEATURE_*π OR them together like you're collecting stickers.
π DESCRIPTION π
so what does this function actually do? it creates a new gpiochip, and that gpiochip forwards all GPIO operations to the passed GPIO descriptors π« that's the whole vibe. everything in, everything forwarded out. she's basically the group chat admin relaying messages between everyone π§
β RETURN β
you get back an opaque object pointer π β or, if things go wrong, an ERR_PTR-encoded negative error code π (yes, ERR_PTR-encoded, don't just check for NULL, iykyk).
π SEE ALSO π
kernel file ./drivers/gpio/gpio-aggregator.c
and the whole friend group π:
gpiochip_fwd_get_gpiochip(9)gpiochip_fwd_get_data(9)gpiochip_fwd_gpio_request(9)gpiochip_fwd_gpio_get_direction(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)
periodt. that's the page. go forward some GPIOs responsibly π
and that's a wrap, bestie π this iconic little page lives at ./drivers/gpio, dated October 2026, and yes it's filed under gpiochip_fwd_create(9) β slay π
π¦ 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