gpio: xgene: Fix kconfig for standby GIPO contoller
PATCH 1/1 gpio: xgene: Fix kconfig for standby GIPO contoller
The standby GPIO controller can be used as a interrupt controller. Select GPIOLIB_IRQCHIP when compiling this driver. Otherwise we get a compilation error:
drivers/gpio/gpio-xgene-sb.c: In function 'xgene_gpio_sb_probe':drivers/gpio/gpio-xgene-sb.c:312:10: error: 'struct gpio_chip' has no member named 'irqdomain'
priv->gc.irqdomain = priv->irq_domain;
^scripts/Makefile.build:295: recipe for target 'drivers/gpio/gpio-xgene-sb.o' failed make[2]: *** [drivers/gpio/gpio-xgene-sb.o] Error 1
Apart if compiled as module, we get the following modpost errors:
ERROR: "irq_chip_eoi_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_chip_unmask_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_chip_mask_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_create_hierarchy" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "gpiochip_get_data" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_chip_set_type_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_alloc_irqs_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_set_hwirq_and_chip" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_reset_irq_data" [drivers/gpio/gpio-xgene-sb.ko] undefined!
This patch changes the kconfig so that the gpio controller can only be build-in and selects GPIOLIB_IRQCHIP.
---
Changes for v2:
- Add modprobe fix, changing tristate to bool
- Add Cc tag
drivers/gpio/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpio/Kconfig +2 -1
@@ -449,9 +449,10 @@ config GPIO_XGENE here to enable the GFC GPIO functionality. config GPIO_XGENE_SB - tristate "APM X-Gene GPIO standby controller support" + bool "APM X-Gene GPIO standby controller support" depends on ARCH_XGENE && OF_GPIO select GPIO_GENERIC + select GPIOLIB_IRQCHIP help This driver supports the GPIO block within the APM X-Gene Standby Domain. Say yes here to enable the GPIO functionality.
Signature · 1 line
2.6.2
Quoted 25 lines · Matthias Brugger
The standby GPIO controller can be used as a interrupt controller. Select
GPIOLIB_IRQCHIPwhen compiling this driver. Otherwise we get a compilation error:
drivers/gpio/gpio-xgene-sb.c: In function 'xgene_gpio_sb_probe':drivers/gpio/gpio-xgene-sb.c:312:10: error: 'structgpio_chip' has no member named 'irqdomain'priv->gc.irqdomain = priv->irq_domain; ^
scripts/Makefile.build:295: recipe for target 'drivers/gpio/gpio-xgene-sb.o' failed make[2]: *** [drivers/gpio/gpio-xgene-sb.o] Error 1Apart if compiled as module, we get the following modpost errors:
ERROR: "irq_chip_eoi_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_chip_unmask_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_chip_mask_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_create_hierarchy" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "gpiochip_get_data" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_chip_set_type_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_alloc_irqs_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_set_hwirq_and_chip" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_reset_irq_data" [drivers/gpio/gpio-xgene-sb.ko] undefined!This patch changes the kconfig so that the gpio controller can only be build-in and selects
GPIOLIB_IRQCHIP.
Quoted 8 lines
Fixes 1013fc41 "gpio: xgene: Enable X-Gene standby GPIO as interrupt controller"Cc Quan Nguyen <[email protected]>Signed-off-by Matthias Brugger <[email protected]>---
Changes for v2:
- Add modprobe fix, changing tristate to bool
- Add Cc tag
Quan has sent a patch exporting the offending functions, but no reply from the irqchip maintainers yet.
If they don't react we'll have to merge this and handle the module loading later.
Yours,
Linus Walleij
Quoted 36 lines · Linus Walleij
Quoted 25 lines · Matthias Brugger
The standby GPIO controller can be used as a interrupt controller. Select
GPIOLIB_IRQCHIPwhen compiling this driver. Otherwise we get a compilation error:
drivers/gpio/gpio-xgene-sb.c: In function 'xgene_gpio_sb_probe':drivers/gpio/gpio-xgene-sb.c:312:10: error: 'structgpio_chip' has no member named 'irqdomain'priv->gc.irqdomain = priv->irq_domain; ^
scripts/Makefile.build:295: recipe for target 'drivers/gpio/gpio-xgene-sb.o' failed make[2]: *** [drivers/gpio/gpio-xgene-sb.o] Error 1Apart if compiled as module, we get the following modpost errors:
ERROR: "irq_chip_eoi_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_chip_unmask_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_chip_mask_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_create_hierarchy" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "gpiochip_get_data" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_chip_set_type_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_alloc_irqs_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_set_hwirq_and_chip" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_reset_irq_data" [drivers/gpio/gpio-xgene-sb.ko] undefined!This patch changes the kconfig so that the gpio controller can only be build-in and selects
GPIOLIB_IRQCHIP.Quoted 8 lines
Fixes 1013fc41 "gpio: xgene: Enable X-Gene standby GPIO as interrupt controller"Cc Quan Nguyen <[email protected]>Signed-off-by Matthias Brugger <[email protected]>---
Changes for v2:
- Add modprobe fix, changing tristate to bool
- Add Cc tag
Quoted 6 lines
Quan has sent a patch exporting the offending functions, but no reply from the irqchip maintainers yet.
If they don't react we'll have to merge this and handle the module loading later.
Thanks for the info.
Just as a heads up, this patch fix two problems. Apart from the missing exports for the irqchip functions, it selects GPIOLIB_IRQCHIP as otherwise the config may be broken.
Actually v1 of this patch just fixes this:
https://patchwork.kernel.org/patch/8502401/
Regards,
Matthias
Quoted 58 lines · Matthias Brugger
Quoted 48 lines · Linus Walleij
Quoted 34 lines · Matthias Brugger
The standby GPIO controller can be used as a interrupt controller. Select
GPIOLIB_IRQCHIPwhen compiling this driver. Otherwise we get a compilation error:
drivers/gpio/gpio-xgene-sb.c: In function 'xgene_gpio_sb_probe':drivers/gpio/gpio-xgene-sb.c:312:10: error: 'structgpio_chip' has no member named 'irqdomain'priv->gc.irqdomain = priv->irq_domain; ^
scripts/Makefile.build:295: recipe for target 'drivers/gpio/gpio-xgene-sb.o' failed make[2]: *** [drivers/gpio/gpio-xgene-sb.o] Error 1Apart if compiled as module, we get the following modpost errors:
ERROR: "irq_chip_eoi_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_chip_unmask_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_chip_mask_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_create_hierarchy" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "gpiochip_get_data" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_chip_set_type_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_alloc_irqs_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_set_hwirq_and_chip" [drivers/gpio/gpio-xgene-sb.ko] undefined!
ERROR: "irq_domain_reset_irq_data" [drivers/gpio/gpio-xgene-sb.ko] undefined!This patch changes the kconfig so that the gpio controller can only be build-in and selects
GPIOLIB_IRQCHIP.Fixes 1013fc41 "gpio: xgene: Enable X-Gene standby GPIO as interruptQuoted 8 lines
controller"
Cc Quan Nguyen <[email protected]>Signed-off-by Matthias Brugger <[email protected]>---
Changes for v2:
- Add modprobe fix, changing tristate to bool
- Add Cc tagQuoted 6 lines
Quan has sent a patch exporting the offending functions, but no reply from the irqchip maintainers yet.
If they don't react we'll have to merge this and handle the module loading later.
Quoted 8 lines
Thanks for the info.
Just as a heads up, this patch fix two problems. Apart from the missing exports for the irqchip functions, it selects
GPIOLIB_IRQCHIPas otherwise the config may be broken.Actually v1 of this patch just fixes this:
https://patchwork.kernel.org/patch/8502401/
Hi Matthias,
I have acked your v1 as it helps fixing compile error if CONFIG_GPIOLIB_IRQCHIP missing.
I also agreed with Linus on your v2.
Hence, I only acked the v2 patch if my patch
(https://lkml.org/lkml/2016/3/3/497) missed the merge windows as this drivers can actually work as a module.
Quoted 3 lines
Regards,
Matthias