devm_regmap..._chip_fwnode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ devm_regmap_add_irq_chip_fwnode ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– this one's a resource-managed little queen β€” it's literally regmap_add_irq_chip_fwnode() but with devm vibes, meaning it cleans up after itself so you don't have to 🫢 and the file lives over in ./drivers/base/regmap, section 9 of the kernel docs, if you're keeping score πŸ’…


🌸 SYNOPSIS 🌸

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

like, yeah, that's a whole lot of arguments, but we're gonna break every single one of them down below, no cap ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device pointer that the irq_chip belongs to. it's giving "whose chip is this anyway" energy πŸ‘‘
  • fwnode β€” the firmware node where the IRQ domain should be added to. that's the spot, bestie πŸ¦‹
  • map β€” the regmap for the device. your register map, your bestie πŸ’œ
  • irq β€” the IRQ the device uses to signal interrupts πŸ”₯
  • irq_flags β€” the IRQF_ flags to use for the primary interrupt. yes, those flags, keep them safe πŸ’…
  • irq_base β€” allocate at a specific IRQ number if irq_base > 0. very "I want it right there" of you 🎯
  • chip β€” configuration for the interrupt controller. the whole blueprint, honestly 🌈
  • data β€” runtime data structure for the controller, allocated on success. it only shows up if things go well, main character behavior 😭

⭐ DESCRIPTION ⭐

Returns 0 on success or an errno on failure. simple as that, no mystery πŸ“

The regmap_irq_chip_data will be automatically released when the device is unbound β€” that's the whole devm slay, bestie, it cleans up so you literally cannot leak it πŸ™ˆ


πŸ’€ SEE ALSO πŸ’€

Kernel file ./drivers/base/regmap/regmap-irq.c


ngl, this whole page comes from ./drivers/base/regmap, dated October 2026, in the Kernel API Manual β€” so go read the neighbors too, iykyk πŸ’–

and that's the vibe check, bestie β€” go forth and add your irq chips responsibly βœ¨πŸŽ€πŸ’…

πŸ“¦ where this page comes from