aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2015-01-26 23:46:04 -0500
committerLinus Walleij <linus.walleij@linaro.org>2015-02-03 07:37:47 -0500
commitae4f4cfd8e9f6844c32a8913b8cb4f39ac9216ce (patch)
treeaba61287dacc150782a45fe97cff63efbdc56183 /drivers/gpio
parent37fc8a92daf5e775a18790ccd935240ef72ddd83 (diff)
gpio: pxa: remove mach IRQ includes
In preparation to enable ARCH_MMP on ARM64, the include of mach/irqs.h must be eliminated. mach/irqs.h was being included for IRQ_GPIO{0,1}, but these IRQs are always passed in as resources now. We can use irq0 and irq1 and get rid of IRQ_GPIOx. Get rid of the ifdef in the process as it is no longer needed. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-pxa.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index ad3feec0075e..b4fb8de374c8 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -17,6 +17,7 @@
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/gpio-pxa.h> 18#include <linux/gpio-pxa.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/interrupt.h>
20#include <linux/irq.h> 21#include <linux/irq.h>
21#include <linux/irqdomain.h> 22#include <linux/irqdomain.h>
22#include <linux/irqchip/chained_irq.h> 23#include <linux/irqchip/chained_irq.h>
@@ -27,8 +28,6 @@
27#include <linux/syscore_ops.h> 28#include <linux/syscore_ops.h>
28#include <linux/slab.h> 29#include <linux/slab.h>
29 30
30#include <mach/irqs.h>
31
32/* 31/*
33 * We handle the GPIOs by banks, each bank covers up to 32 GPIOs with 32 * We handle the GPIOs by banks, each bank covers up to 32 GPIOs with
34 * one set of registers. The register offsets are organized below: 33 * one set of registers. The register offsets are organized below:
@@ -629,19 +628,18 @@ static int pxa_gpio_probe(struct platform_device *pdev)
629 } 628 }
630 629
631 if (!use_of) { 630 if (!use_of) {
632#ifdef CONFIG_ARCH_PXA 631 if (irq0 > 0) {
633 irq = gpio_to_irq(0); 632 irq = gpio_to_irq(0);
634 irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, 633 irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip,
635 handle_edge_irq); 634 handle_edge_irq);
636 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 635 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
637 irq_set_chained_handler(IRQ_GPIO0, pxa_gpio_demux_handler); 636 }
638 637 if (irq1 > 0) {
639 irq = gpio_to_irq(1); 638 irq = gpio_to_irq(1);
640 irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, 639 irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip,
641 handle_edge_irq); 640 handle_edge_irq);
642 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 641 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
643 irq_set_chained_handler(IRQ_GPIO1, pxa_gpio_demux_handler); 642 }
644#endif
645 643
646 for (irq = gpio_to_irq(gpio_offset); 644 for (irq = gpio_to_irq(gpio_offset);
647 irq <= gpio_to_irq(pxa_last_gpio); irq++) { 645 irq <= gpio_to_irq(pxa_last_gpio); irq++) {
@@ -649,13 +647,13 @@ static int pxa_gpio_probe(struct platform_device *pdev)
649 handle_edge_irq); 647 handle_edge_irq);
650 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 648 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
651 } 649 }
652 } else {
653 if (irq0 > 0)
654 irq_set_chained_handler(irq0, pxa_gpio_demux_handler);
655 if (irq1 > 0)
656 irq_set_chained_handler(irq1, pxa_gpio_demux_handler);
657 } 650 }
658 651
652 if (irq0 > 0)
653 irq_set_chained_handler(irq0, pxa_gpio_demux_handler);
654 if (irq1 > 0)
655 irq_set_chained_handler(irq1, pxa_gpio_demux_handler);
656
659 irq_set_chained_handler(irq_mux, pxa_gpio_demux_handler); 657 irq_set_chained_handler(irq_mux, pxa_gpio_demux_handler);
660 return 0; 658 return 0;
661} 659}