zynq_gpio_get_bank_pin(9)
π zynq_gpio_get_bank_pin(9) β a Kernel API Manual moment
okay so bestie, welcome to the Kernel API Manual β¨ this one's a little helper function in the kernel, and honestly? she's serving utility. her whole job is telling you which bank a GPIO pin lives in, and what its pin number is inside that bank. no cap, that's it. π
β¨ NAME β¨
zynq_gpio_get_bank_pin β get the bank number and pin number within that bank for a given pin in the GPIO device π¦
like, you hand her a pin, she tells you where it actually lives. it's giving "let me look that up for you bestie" energy.
β¨ SYNOPSIS β¨
void zynq_gpio_get_bank_pin (unsigned int pin_num , unsigned int
*bank_num , unsigned int *bank_pin_num , struct zynq_gpio *gpio );
note the void β she does not return a value to you, she writes into your pointers instead. classic. π
β¨ ARGUMENTS β¨
pin_numβ the gpio pin number within the device πΈ this is the one you're asking about, your main character input.bank_numβ an output parameter used to return the bank number of the gpio pin π you pass the address, she fills it in. that's the whole vibe.bank_pin_numβ an output parameter used to return pin number within a bank for the given gpio pin π so like, the local coordinates. the within-bank address. iykyk.gpioβ gpio device data structure π§ the device she's looking at,struct zynq_gpio *style.
lowkey important:bank_numandbank_pin_numare output parameters fr fr β she's not reading them, she's writing to them. give her real pointers or it's not gonna be a good time. π
β¨ DESCRIPTION β¨
Returns the bank number and pin offset within the bank. π«Ά
that's the entire plot. one pin in, two numbers out. she's not doing anything fancy, she's just doing it correctly, and honestly? iconic. π
β¨ SEE ALSO β¨
so if you're going down the rabbit hole (and you should be, bestie), the kernel file is ./drivers/gpio/gpio-zynq.c β and here's 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_value(9)zynq_gpio_set_value(9)zynq_gpio_dir_in(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)
and that's the whole page, bestie!! πβ¨π this lil cutie lives in ./drivers/gpio, dated October 2026, and she's out here slaying the zynq_gpio_get_bank_pin(9) lifestyle. go read some GPIO code, ily, bye π«Άπ
π¦ 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