Skip to content

Commit 880b7cf

Browse files
haokexinlinusw
authored andcommitted
gpiolib: Add the support for the msi parent domain
If the gpio's parent irqdomain is a msi irqdomain, we should ignore the EEXIST error returned by the msi irqdomain because all the msi interrupts have already been allocated. Signed-off-by: Kevin Hao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 2425876 commit 880b7cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpio/gpiolib.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2050,6 +2050,12 @@ static int gpiochip_hierarchy_irq_domain_alloc(struct irq_domain *d,
20502050
chip_info(gc, "alloc_irqs_parent for %d parent hwirq %d\n",
20512051
irq, parent_hwirq);
20522052
ret = irq_domain_alloc_irqs_parent(d, irq, 1, parent_arg);
2053+
/*
2054+
* If the parent irqdomain is msi, the interrupts have already
2055+
* been allocated, so the EEXIST is good.
2056+
*/
2057+
if (irq_domain_is_msi(d->parent) && (ret == -EEXIST))
2058+
ret = 0;
20532059
if (ret)
20542060
chip_err(gc,
20552061
"failed to allocate parent hwirq %d for hwirq %lu\n",

0 commit comments

Comments
 (0)