pinctrl/abx500: move IRQ handling to ab8500-core
authorLee Jones <lee.jones@linaro.org>
Thu, 31 Jan 2013 10:43:00 +0000 (10:43 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 10 Feb 2013 14:14:13 +0000 (15:14 +0100)
commitac652d7941f84c24cb27378aefbb4015f4c1da67
treee0ab3c787f478562d41112710ac0aa18ae03c80a
parent7ac63ac61d67703aba1add4a89c4de702068d2f2
pinctrl/abx500: move IRQ handling to ab8500-core

In its current state the gpio-ab8500 driver looks after some GPIO
lines found on the AB8500 MFD chip. It also controls all of its
own IRQ handling for these GPIOs by inventing some virtual IRQs
and handing those out to sub-devices. There has been quite a bit
of controversy over this and it was a contributing factor to the
driver being marked as BROKEN in Mainline.

The reason for adopting this method was due to added complexity
in the hardware. Unusually, each GPIO has two separate IRQs
associated with it, one for a rising and a different one for a
falling interrupt. Using this method complicates matters further
because the GPIO IRQs are actually sandwiched between a bunch
of IRQs which are handled solely by the AB8500 core driver.

The best way for us to take this forward is to get rid of the
virtual IRQs and only hand out the rising IRQ lines. If a
sub-driver wishes to request a falling interrupt, they can do
so by requesting a rising line in the normal way. They just
have to add IRQ_TYPE_EDGE_FALLING or IRQ_TYPE_EDGE_BOTH, if
they require both in the flags. Then if a falling IRQ is
triggered, the AB8500 core driver will know how to handle the
added complexity accordingly. This should greatly simply things.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
[Augment to keep irq_base for a while (removed later)]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-abx500.c
This page took 0.026291 seconds and 5 git commands to generate.