Commit 880b7cf2 authored by Kevin Hao's avatar Kevin Hao Committed by Linus Walleij

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: default avatarKevin Hao <haokexin@gmail.com>
Link: https://lore.kernel.org/r/20200114082821.14015-4-haokexin@gmail.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 24258761
...@@ -2050,6 +2050,12 @@ static int gpiochip_hierarchy_irq_domain_alloc(struct irq_domain *d, ...@@ -2050,6 +2050,12 @@ static int gpiochip_hierarchy_irq_domain_alloc(struct irq_domain *d,
chip_info(gc, "alloc_irqs_parent for %d parent hwirq %d\n", chip_info(gc, "alloc_irqs_parent for %d parent hwirq %d\n",
irq, parent_hwirq); irq, parent_hwirq);
ret = irq_domain_alloc_irqs_parent(d, irq, 1, parent_arg); ret = irq_domain_alloc_irqs_parent(d, irq, 1, parent_arg);
/*
* If the parent irqdomain is msi, the interrupts have already
* been allocated, so the EEXIST is good.
*/
if (irq_domain_is_msi(d->parent) && (ret == -EEXIST))
ret = 0;
if (ret) if (ret)
chip_err(gc, chip_err(gc,
"failed to allocate parent hwirq %d for hwirq %lu\n", "failed to allocate parent hwirq %d for hwirq %lu\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment