devm_regmap..._chip_fwnode(9)
β¨ 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β theIRQF_flags to use for the primary interrupt. yes, those flags, keep them safe πirq_baseβ allocate at a specific IRQ number ifirq_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
regmap_irq_get_irq_reg_linear(9)regmap_irq_set_type_config_simple(9)regmap_add_irq_chip_fwnode(9)regmap_add_irq_chip(9)regmap_del_irq_chip(9)devm_regmap_add_irq_chip(9)devm_regmap_del_irq_chip(9)regmap_irq_chip_get_base(9)regmap_irq_get_virq(9)regmap_irq_get_domain(9)
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
- 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