I have a code which detects GPIO interrupt in a kernel module. Now,I am looking for a mechanism to notify user space upon detecting gpio interrupt from kernel module. Any example / code snippet with certain advantages/disadvantages over different options? I would appreciate your response.
Take a look at the GPIO keyboard driver (drivers/input/keyboard/gpio_keys.c
). It is a good starting point for your problem.
In the userspace you then listen (some blocking read for example, or just tail
to test) to /dev/input/yourevent
for events.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With