From f60c8ba77dcea80af8facfd786a0d2c3ace86f3d Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 16 Mar 2015 21:19:56 -0700 Subject: 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 Tested-by: Pavel Machek Acked-by: Pavel Machek Signed-off-by: Dmitry Torokhov --- drivers/input/Kconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'drivers/input/Kconfig') diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index a11ff74a5127..a35532ec00e4 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -25,6 +25,19 @@ config INPUT if INPUT +config INPUT_LEDS + tristate "Export input device LEDs in sysfs" + depends on LEDS_CLASS + default INPUT + help + Say Y here if you would like to export LEDs on input devices + as standard LED class devices in sysfs. + + If unsure, say Y. + + To compile this driver as a module, choose M here: the + module will be called input-leds. + config INPUT_FF_MEMLESS tristate "Support for memoryless force-feedback devices" help -- cgit v1.2.3