diff options
author | Kevin Hao <haokexin@gmail.com> | 2020-01-14 09:28:20 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-01-15 11:18:05 +0100 |
commit | 880b7cf22e8ca08abd969b0f1c65a79121e025c5 (patch) | |
tree | 4604f6f8a618068822428ec2d70ad47e1dd7ff2e /drivers/gpio | |
parent | gpiolib: Add support for the irqdomain which doesn't use irq_fwspec as arg (diff) | |
download | linux-880b7cf22e8ca08abd969b0f1c65a79121e025c5.tar.xz linux-880b7cf22e8ca08abd969b0f1c65a79121e025c5.zip |
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 <haokexin@gmail.com>
Link: https://lore.kernel.org/r/20200114082821.14015-4-haokexin@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpiolib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index e0200dda2aee..4b94b9e37fdb 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -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", irq, parent_hwirq); 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) chip_err(gc, "failed to allocate parent hwirq %d for hwirq %lu\n", |