devm_regmap_add_irq_chip(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… devm_regmap_add_irq_chip β€” the Kernel API Manual moment

okay so bestie, welcome to devm_regmap_add_irq_chip (that's the manual page name btw, it lives in the Kernel API Manual, and it's lowkey iconic). This is the resource-managed version of regmap_add_irq_chip() β€” meaning it handles the cleanup for you so you literally cannot forget. main character energy fr fr πŸŽ€


✨ SYNOPSIS ✨

int devm_regmap_add_irq_chip (struct device *dev , struct regmap *map ,
int irq , int irq_flags , int irq_base , const struct regmap_irq_chip
*chip , struct regmap_irq_chip_data **data );

that's seven whole arguments, no cap. copy it exactly, don't freestyle 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the device pointer that the irq_chip belongs to. like, whose chip is this? this one. πŸ’–
  • map β€” the regmap for the device. the vibe translator between you and the hardware.
  • irq β€” the IRQ the device uses to signal interrupts. the lil "hey notice me" ping ⭐
  • irq_flags β€” the IRQF_ flags to use for the primary interrupt. all the flags, the IRQF_ ones specifically.
  • irq_base β€” allocate at a specific IRQ number if irq_base > 0. only then, bestie. otherwise nah.
  • chip β€” configuration for the interrupt controller. the whole blueprint πŸŽ€
  • data β€” runtime data structure for the controller, allocated on success. you get it back, it's yours ✨

🌸 DESCRIPTION 🌸

Returns 0 on success or an errno on failure. that's it, that's the whole report card πŸ’€

and here's the actual slay: the regmap_irq_chip_data will be automatically released when the device is unbound. no manual freeing, no "oops I forgot", none of that. devm said I got you πŸ˜­πŸ’œ

ngl this is the entire reason devm versions exist. you don't clean up. it cleans up. periodt.

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr β€” go read them too πŸ’…


and that's the page! 🌈 source/version: ./drivers/base/regmap, dated October 2026, and the page is literally called devm_regmap_add_irq_chip(9). mwah, go forth and register those interrupts responsibly πŸ§šβ€β™€οΈπŸ“

πŸ“¦ where this page comes from