diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-11-14 18:48:19 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-12-07 15:27:01 +0100 |
commit | 85ae9e512f437cd09bf61564bdba29ab88bab3e3 (patch) | |
tree | 8e7954b666ea8bef960003b0e1c2369a59fe6628 /drivers/pinctrl/bcm/Kconfig | |
parent | 1ff91f0ae3361f17e42448f6fc7181926ef21587 (diff) |
pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP
It should be possible to use the GPIOLIB_IRQCHIP helper
library with the BCM2835 driver since it is a pretty straight
forward cascaded irqchip.
The only difference from other drivers is that the BCM2835
has several banks for a single gpiochip, and each bank has
a separate IRQ line. Instead of creating one gpiochip per
bank, a single gpiochip covers all banks GPIO lines. This
makes it necessary to resolve the bank ID in the IRQ
handler.
The GPIOLIB_IRQCHIP allows several IRQs to be cascaded off
the same gpiochip by calling gpiochip_set_chained_irqchip()
repeatedly, but we have been a bit short on examples
for how this should be handled in practice, so this is intended
as an example of how this can be achieved.
The old code did not model the chip as a chained interrupt
handler, but this patch also rectifies that situation.
Cc: Stephen Warren <swarren@wwwdotorg.org>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Tested-by: Eric Anholt <eric@anholt.net>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/bcm/Kconfig')
-rw-r--r-- | drivers/pinctrl/bcm/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pinctrl/bcm/Kconfig b/drivers/pinctrl/bcm/Kconfig index 63246770bd74..8968dd7aebed 100644 --- a/drivers/pinctrl/bcm/Kconfig +++ b/drivers/pinctrl/bcm/Kconfig @@ -20,6 +20,7 @@ config PINCTRL_BCM2835 bool select PINMUX select PINCONF + select GPIOLIB_IRQCHIP config PINCTRL_IPROC_GPIO bool "Broadcom iProc GPIO (with PINCONF) driver" |