Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Kevin Hao and committed by
Linus Walleij
880b7cf2 24258761

+6
+6
drivers/gpio/gpiolib.c
··· 2050 2050 chip_info(gc, "alloc_irqs_parent for %d parent hwirq %d\n", 2051 2051 irq, parent_hwirq); 2052 2052 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; 2053 2059 if (ret) 2054 2060 chip_err(gc, 2055 2061 "failed to allocate parent hwirq %d for hwirq %lu\n",