linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: add LED_0..LED_15 define
@ 2017-02-08  0:41 Paulo Costa
  2017-02-11  0:54 ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: Paulo Costa @ 2017-02-08  0:41 UTC (permalink / raw)
  To: linux-input; +Cc: Paulo Costa

Some input devices have many controllable leds that don't fit any standard function (e.g., the Wiimote has 4 controllable LEDs)

Just as we have BTN_0..BTN_9 for generic buttons, LED_0...LED_15 can now be used to control generic leds.

Signed-off-by: Paulo Costa <me@paulo.costa.nom.br>
---
 include/linux/mod_devicetable.h        |  2 +-
 include/uapi/linux/input-event-codes.h | 20 +++++++++++++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index ed84c07..d54cec1 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -288,7 +288,7 @@ struct pcmcia_device_id {
 #define INPUT_DEVICE_ID_REL_MAX		0x0f
 #define INPUT_DEVICE_ID_ABS_MAX		0x3f
 #define INPUT_DEVICE_ID_MSC_MAX		0x07
-#define INPUT_DEVICE_ID_LED_MAX		0x0f
+#define INPUT_DEVICE_ID_LED_MAX		0x1f
 #define INPUT_DEVICE_ID_SND_MAX		0x07
 #define INPUT_DEVICE_ID_FF_MAX		0x7f
 #define INPUT_DEVICE_ID_SW_MAX		0x0f
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 3af60ee..4322682 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -812,7 +812,25 @@
 #define LED_MISC		0x08
 #define LED_MAIL		0x09
 #define LED_CHARGING		0x0a
-#define LED_MAX			0x0f
+
+#define LED_0			0x10
+#define LED_1			0x11
+#define LED_2			0x12
+#define LED_3			0x13
+#define LED_4			0x14
+#define LED_5			0x15
+#define LED_6			0x16
+#define LED_7			0x17
+#define LED_8			0x18
+#define LED_9			0x19
+#define LED_10			0x1a
+#define LED_11			0x1b
+#define LED_12			0x1c
+#define LED_13			0x1d
+#define LED_14			0x1e
+#define LED_15			0x1f
+
+#define LED_MAX			0x1f
 #define LED_CNT			(LED_MAX+1)
 
 /*
-- 
2.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-13  1:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-08  0:41 [PATCH] Input: add LED_0..LED_15 define Paulo Costa
2017-02-11  0:54 ` Dmitry Torokhov
2017-02-13  1:03   ` Paulo Costa
2017-02-13  1:31     ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).