]> git.baikalelectronics.ru Git - kernel.git/commit
Input: export LEDs as class devices in sysfs
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 17 Mar 2015 04:19:56 +0000 (21:19 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 12 Jun 2015 01:18:11 +0000 (18:18 -0700)
commitfb506eeb68a42219fe0a8c73f9272d391052e747
tree4dc115384ea35ba027b7514ca5e6f5fd388daf61
parent2257f39fede996c9eb77a45d217f0549d8e5e8fb
Input: export LEDs as class devices in sysfs

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: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Documentation/leds/leds-class.txt
drivers/input/Kconfig
drivers/input/Makefile
drivers/input/input-leds.c [new file with mode: 0644]
drivers/leds/Kconfig