News for hackers. Stuff that matters.
Re:Writing a Linux Kernel Module — Part 3: Buttons and LEDs by revelation on Tuesday August 25, 2015 @05:21AM (#10115304)
None of this needs an actual kernel driver. You can use interrupt gpios from userspace using poll.
Re:Writing a Linux Kernel Module — Part 3: Buttons and LEDs by kenz0r on Tuesday August 25, 2015 @05:37AM (#10115344)
You can, or you can use the gpio_keys driver to nicely handle it in kernel space and give you key presses via the event subsystem. One small device tree snippet, and you're sorted. There is even a gpio_keys_polled variant if you can't get interrupts from your GPIO controller.