[PATCH 2/2] [bcm2708] GpioLib Counter increment added to GPIO interrupt handler
Federico Fuga
fuga at studiofuga.com
Tue May 27 11:47:29 PDT 2014
GPIO Interrupt counter implementation for bcm2708
Signed-off-by: Federico Fuga <fuga at studiofuga.com>
---
arch/arm/mach-bcm2708/bcm2708_gpio.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/mach-bcm2708/bcm2708_gpio.c b/arch/arm/mach-bcm2708/bcm2708_gpio.c
index bab8a49..e10d42e 100644
--- a/arch/arm/mach-bcm2708/bcm2708_gpio.c
+++ b/arch/arm/mach-bcm2708/bcm2708_gpio.c
@@ -244,6 +244,9 @@ static irqreturn_t bcm2708_gpio_interrupt(int irq, void *dev_id)
edsr = readl(__io_address(GPIO_BASE) + GPIOEDS(bank));
for_each_set_bit(i, &edsr, 32) {
gpio = i + bank * 32;
+#ifdef CONFIG_GPIO_COUNTER
+ gpio_counter_inc(gpio);
+#endif
generic_handle_irq(gpio_to_irq(gpio));
}
writel(0xffffffff, __io_address(GPIO_BASE) + GPIOEDS(bank));
--
1.9.1
More information about the linux-rpi-kernel
mailing list