Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abbea718 authored by Andrew Victor's avatar Andrew Victor Committed by Russell King
Browse files

[ARM] 3348/1: Disable GPIO interrupts



Patch from Andrew Victor

disable_irq() lazily disables the interrupt, so the IRQ is only disabled
once the interrupt occurs again.  The GPIO interrupt handler therefore
must first check disable_depth to see if the IRQ needs to be disabled.

Orignal patch by Bill Gatliff.

Signed-off-by: default avatarAndrew Victor <andrew@sanpeople.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent f52ee141
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -274,8 +274,18 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
		gpio = &irq_desc[pin];

		while (isr) {
			if (isr & 1)
			if (isr & 1) {
				if (unlikely(gpio->disable_depth)) {
					/*
					 * The core ARM interrupt handler lazily disables IRQs so
					 * another IRQ must be generated before it actually gets
					 * here to be disabled on the GPIO controller.
					 */
					gpio_irq_mask(pin);
				}
				else
					gpio->handle(pin, gpio, regs);
			}
			pin++;
			gpio++;
			isr >>= 1;