• Samuel Thibault's avatar
    Input: export LEDs as class devices in sysfs · f60c8ba7
    Samuel Thibault authored
    This change creates a new input handler called "leds" that exports LEDs on input
    devices as standard LED class devices in sysfs and allows controlling their
    state via sysfs or via any of the standard LED triggers. This allows to
    re-purpose and reassign LDEs on the keyboards to represent states other
    than the standard keyboard states (CapsLock, NumLock, etc).
    
    The old API of controlling input LEDs by writing into /dev/input/eventX
    devices is still present and will take precedence over accessing via LEDs
    subsystem (i.e. it may override state set by a trigger). If input device is
    "grabbed" then requests coming through LED subsystem will be ignored.
    Signed-off-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
    Tested-by: default avatarPavel Machek <pavel@ucw.cz>
    Acked-by: default avatarPavel Machek <pavel@ucw.cz>
    Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    f60c8ba7
leds-class.txt 3.86 KB