zynq_gpio_set_irq_type(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ zynq_gpio_set_irq_type(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– this one lives in section 9 and it's literally called zynq_gpio_set_irq_type β€” the whole vibe is setting the irq type for a gpio pin πŸŽ€


🌸 NAME 🌸

zynq_gpio_set_irq_type β€” Set the irq type for a gpio pin πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int zynq_gpio_set_irq_type (struct irq_data *irq_data , unsigned int
type );

so it takes a struct irq_data * and an unsigned int and hands you back an int, no cap ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • irq_data β€” the irq data containing the irq number of the gpio pin. like, it's giving "which pin are we even talking about" energy πŸ™ˆ
  • type β€” the interrupt type that is to be set for that gpio pin. this is the main character of the whole function tbh πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

Bestie, here's the tea πŸ“ this function gets the gpio pin number and its bank from the gpio pin number, and then it configures the INT_TYPE, INT_POLARITY and INT_ANY registers. that's it, that's the whole glow-up πŸ”₯


⭐ RETURN ⭐

Returns 0, or a negative error otherwise. and now the receipts, because the mapping is very much specific 🧚

  • TYPE-EDGE_RISING β†’ INT_TYPE - 1, INT_POLARITY - 1, INT_ANY - 0
  • TYPE-EDGE_FALLING β†’ INT_TYPE - 1, INT_POLARITY - 0, INT_ANY - 0
  • TYPE-EDGE_BOTH β†’ INT_TYPE - 1, INT_POLARITY - NA, INT_ANY - 1
  • TYPE-LEVEL_HIGH β†’ INT_TYPE - 0, INT_POLARITY - 1, INT_ANY - NA
  • TYPE-LEVEL_LOW β†’ INT_TYPE - 0, INT_POLARITY - 0, INT_ANY - NA

like, please don't mix these up, the hardware will simply not slay πŸ’€


🌈 SEE ALSO 🌈

Kernel file ./drivers/gpio/gpio-zynq.c, plus the whole friend group 🫢


k that's the whole page, go read the source in ./drivers/gpio if you wanna fact-check me, iykyk πŸ‘€

mwah, bye bestie β€” this one's filed under ./drivers/gpio, dated October 2026, and it's page zynq_gpio_set_irq_type(9) of the Kernel API Manual. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from