pinctrl: ocelot: add support for interrupt controller
authorQuentin Schulz <quentin.schulz@bootlin.com>
Wed, 25 Jul 2018 12:26:21 +0000 (14:26 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 6 Aug 2018 11:00:17 +0000 (13:00 +0200)
commitbe36abb71d878f3320412a84e6bbec8dd796010c
tree21b80e5e6c09b818ab62d47473a8ac1f116078fe
parentcb85d2b04b408ba8328eb5fa1e184cc538ba8c6a
pinctrl: ocelot: add support for interrupt controller

This GPIO controller can serve as an interrupt controller as well on the
GPIOs it handles.

An interrupt is generated whenever a GPIO line changes and the
interrupt for this GPIO line is enabled. This means that both the
changes from low to high and high to low generate an interrupt.

For some use cases, it makes sense to ignore the high to low change and
not generate an interrupt. Such a use case is a line that is hold in a
level high/low manner until the event holding the line gets acked.
This can be achieved by making sure the interrupt on the GPIO controller
side gets acked and masked only after the line gets hold in its default
state, this is what's done with the fasteoi functions.

Only IRQ_TYPE_EDGE_BOTH and IRQ_TYPE_LEVEL_HIGH are supported for now.

Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/Kconfig
drivers/pinctrl/pinctrl-ocelot.c