Linux Kernel Drivers

Linux Drivers

Release Date
2023-07-22

The gpio-keys, gpio-keys-polled and leds-gpio drivers are a powerful alternative to the SysFs interface for accessing GPIO from user space.

  • gpio-keys is used when GPIO line can generate interrupts in response to a key press.
  • gpio-keys-polled is used when GPIO line cannot generate interrupts, so it needs to be periodically polled by a timer.
  • leds-gpio will handle LEDs connected to GPIO lines, giving the LED sysfs interface.

This section covers process of modifying the device tree (DTS) and kernel configuration and includes an example application to demonstrate the function of these drivers. These drivers are suitable for more complex applications involving generating patterns or handling interrupts.