Linux Kernel Interface To Finally Allow For Programmable LED Patterns
It's not often we get to talk about the LED drivers for the Linux kernel... Yes, the class of Linux kernel drivers to support controlling the brightness of LEDs via supported drivers and exposing that to user-space. With Linux 4.20~5.0 comes finally the ability to program "patterns" for LEDs.
The feature seems long overdue given all of the RGB lighting rage among PC enthusiasts and a lot of Windows LED control software allowing pre-set patterns to be applied to LED lights. With the next kernel cycle will come the ability to have a - standardized interface - for pattern triggers within the LED class of Linux kernel drivers. This functionality was proposed years ago for the Linux kernel LED drivers but failed to materialize until recently.
From user-space (a new pattern file within /sys/class/leds) allows writing a pattern that consists of a series of brightness levels for the LED and durations (in milliseconds) for being able to loop through a series of LED brightness levels on a timed basis. The pattern can be repeated based upon a new repeat sysfs file.
Besides these software patterns, the new core code also allows for hardware patterns to be applied -- contingent upon the LED hardware's capabilities and any built-in patterns it may support.
This LED pattern trigger support is the main addition as part of the LED updates submitted today for the Linux 4.20~5.0 cycle.