No matter how slow is the signal you'd like to measure, you will likely be missing some pulses if you simply try to poll the GPIO line. Your task will be serviced a lot better by using an interrupt line. All that your driver has to do is to keep 4 counter variables and update their values using an interrupt routine: http://foxg20.acmesystems.it/doku.php?id=contributes:marcusfolkesson:... To interface the driver with non-kernel code you could create a device node in /dev, or maybe register the counters as read-only pseudo files under /proc o /sys. You can dig inside the ADC module for an example code doing this task: http://sourceforge.net/apps/trac/acme-dev/browser/kernel-stuff/adc-dr...