diff options
| -rw-r--r-- | drivers/pinctrl/pinctrl-sunxi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c index 9ccf681dad2f..787f352e3461 100644 --- a/drivers/pinctrl/pinctrl-sunxi.c +++ b/drivers/pinctrl/pinctrl-sunxi.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
| 15 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
| 16 | #include <linux/irqdomain.h> | 16 | #include <linux/irqdomain.h> |
| 17 | #include <linux/irqchip/chained_irq.h> | ||
| 17 | #include <linux/module.h> | 18 | #include <linux/module.h> |
| 18 | #include <linux/of.h> | 19 | #include <linux/of.h> |
| 19 | #include <linux/of_address.h> | 20 | #include <linux/of_address.h> |
| @@ -665,6 +666,7 @@ static struct irq_chip sunxi_pinctrl_irq_chip = { | |||
| 665 | 666 | ||
| 666 | static void sunxi_pinctrl_irq_handler(unsigned irq, struct irq_desc *desc) | 667 | static void sunxi_pinctrl_irq_handler(unsigned irq, struct irq_desc *desc) |
| 667 | { | 668 | { |
| 669 | struct irq_chip *chip = irq_get_chip(irq); | ||
| 668 | struct sunxi_pinctrl *pctl = irq_get_handler_data(irq); | 670 | struct sunxi_pinctrl *pctl = irq_get_handler_data(irq); |
| 669 | const unsigned long reg = readl(pctl->membase + IRQ_STATUS_REG); | 671 | const unsigned long reg = readl(pctl->membase + IRQ_STATUS_REG); |
| 670 | 672 | ||
| @@ -674,10 +676,12 @@ static void sunxi_pinctrl_irq_handler(unsigned irq, struct irq_desc *desc) | |||
| 674 | if (reg) { | 676 | if (reg) { |
| 675 | int irqoffset; | 677 | int irqoffset; |
| 676 | 678 | ||
| 679 | chained_irq_enter(chip, desc); | ||
| 677 | for_each_set_bit(irqoffset, ®, SUNXI_IRQ_NUMBER) { | 680 | for_each_set_bit(irqoffset, ®, SUNXI_IRQ_NUMBER) { |
| 678 | int pin_irq = irq_find_mapping(pctl->domain, irqoffset); | 681 | int pin_irq = irq_find_mapping(pctl->domain, irqoffset); |
| 679 | generic_handle_irq(pin_irq); | 682 | generic_handle_irq(pin_irq); |
| 680 | } | 683 | } |
| 684 | chained_irq_exit(chip, desc); | ||
| 681 | } | 685 | } |
| 682 | } | 686 | } |
| 683 | 687 | ||
