[PATCH 0/2] Pulse counter implementation through GPIOlib V.2

Federico Fuga fuga at studiofuga.com
Wed May 28 03:17:47 PDT 2014


Hello,

This patchset implements a pulse counter using GPIOlib. It adds the 
"counter" sysfs node inside the gpioXXX directory, and allows counter 
reading and resetting.
It exports 3 functions, whose gpio_counter_inc(gpio) implements the atomic 
increment.
The first patch modifies GPIOlib, and is architecture-agnostic.
This feature can be enabled/disabled through Kconfig.
The second patch implements the counter support inside the bcm2708/
RaspberryPI cpu.

Hope that helps, and looking forward for comments.

Best regards


Federico Fuga
Federico Fuga (2):
  [GPIOLib] GPIO Interrupt counter support v2
  [bcm2708] GpioLib Counter increment added to GPIO interrupt handler V2

 arch/arm/mach-bcm2708/bcm2708_gpio.c |  1 +
 drivers/gpio/Kconfig                 |  9 ++++
 drivers/gpio/gpiolib.c               | 92 ++++++++++++++++++++++++++++++++++++
 include/asm-generic/gpio.h           | 25 ++++++++++
 4 files changed, 127 insertions(+)

-- 
1.9.1




More information about the linux-rpi-kernel mailing list