zynq_gpio_dir_in(9)
π zynq_gpio_dir_in β a kernel API manual, bestie edition β¨
okay so bestie, we're deep in the zynq_gpio filesystem of the Kernel API Manual and this one is lowkey a glow-up moment for one single pin π
πΈ NAME πΈ
zynq_gpio_dir_in β Set the direction of the specified GPIO pin as input π
like, you're telling a pin "hey girl, you're listening now, not talking" and honestly? iconic.
β¨ SYNOPSIS β¨
int zynq_gpio_dir_in (struct gpio_chip *chip , unsigned int pin );
that's it. that's the whole vibe check. two arguments, one int coming back at you π«Ά
π¦ ARGUMENTS π¦
chipβ thegpio_chipinstance to be worked on, aka the main character we're operating on πpinβ the gpio pin number within the device, aka which specific little guy we're flipping to input mode πΈ
π₯ DESCRIPTION π₯
so this function uses the read-modify-write sequence to set the direction of the gpio pin as input. no cap, that's the whole method: you read what's there, you modify the bits you care about, you write it back. the way that it just works πβ¨
π RETURN π
0 β always. every single time. 0. she's consistent, she's reliable, she never misses ππ
π SEE ALSO π
Kernel file ./drivers/gpio/gpio-zynq.c and the whole friend group:
struct zynq_gpio(9)struct zynq_platform_data(9)zynq_gpio_is_zynq(9)gpio_data_ro_bug(9)zynq_gpio_get_bank_pin(9)zynq_gpio_get_value(9)zynq_gpio_set_value(9)zynq_gpio_dir_out(9)zynq_gpio_get_direction(9)zynq_gpio_irq_mask(9)zynq_gpio_irq_unmask(9)zynq_gpio_irq_ack(9)zynq_gpio_irq_enable(9)zynq_gpio_set_irq_type(9)zynq_gpio_irqhandler(9)zynq_gpio_probe(9)zynq_gpio_remove(9)
iykyk, go read them all, they're all slay in their own way π§π
ok that's the whole page bestie, go set some pins to input and periodt π
and that's a wrap, bestie! π this little page lives in ./drivers/gpio and the version/date stamp says October 2026 β so mark your calendar, screenshot it, send it to the group chat, and remember: zynq_gpio_dir_in(9) ate and left no crumbs π₯πβ
π¦ 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