summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-sa1100.c
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2015-01-15 04:29:16 +0300
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-01-29 18:24:46 +0300
commit83508093f448e929bf55d07dd08246d22b03d753 (patch)
tree60a1ecb382a012bb5626b556f7c2aa848f7038d0 /drivers/gpio/gpio-sa1100.c
parent7a8ca0a0c480fedf91bdbadf8b90edd5374ce18b (diff)
downloadlinux-83508093f448e929bf55d07dd08246d22b03d753.tar.xz
ARM: 8278/1: sa1100: split irq handling for low GPIOs
Low GPIO pins use an interrupt in SC interrupts space. However it's possible to handle them as if all the GPIO interrupts are instead tied to single GPIO handler, which later decodes GEDR register and chain-calls next IRQ handler. So split first 11 interrupts into system part (IRQ_GPIO0_SC - IRQ_GPIO10_SC) which work exactly like the rest of system controller interrupts and real GPIO interrupts (IRQ_GPIO0..IRQ_GPIO10). A single handler sa1100_gpio_handler then decodes and calls next handler. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/gpio/gpio-sa1100.c')
-rw-r--r--drivers/gpio/gpio-sa1100.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c
index a90be34e4d5c..5b5d3c7bb84e 100644
--- a/drivers/gpio/gpio-sa1100.c
+++ b/drivers/gpio/gpio-sa1100.c
@@ -50,7 +50,7 @@ static int sa1100_direction_output(struct gpio_chip *chip, unsigned offset, int
static int sa1100_to_irq(struct gpio_chip *chip, unsigned offset)
{
- return offset < 11 ? (IRQ_GPIO0 + offset) : (IRQ_GPIO11 - 11 + offset);
+ return IRQ_GPIO0 + offset;
}
static struct gpio_chip sa1100_gpio_chip = {