Skip to contentSkip to conversation

Input: Add SW_PEN_INSERTED define

PATCH Applied Douglas Anderson 2 participants 2 messages Jun 28, 2016 – Jun 29, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: Add SW_PEN_INSERTED define

Some devices with a pen may have a switch that can be used to detect when the pen is inserted or removed to a slot on the device. Let's add a define to the input event codes so that everyone can be on the same page for what event we should generate when the pen is inserted or removed.

In general the pen switch could be used by the software on the device to kick off any number of actions when the pen is inserted or removed.

---
 include/uapi/linux/input-event-codes.h | 1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/input-event-codes.h +1 -0
index 737fa32faad4..d6d071fc3c56 100644
@@ -780,6 +780,7 @@
 #define SW_ROTATE_LOCK		0x0c  /* set = rotate locked/disabled */
 #define SW_LINEIN_INSERT	0x0d  /* set = inserted */
 #define SW_MUTE_DEVICE		0x0e  /* set = device disabled */
+#define SW_PEN_INSERTED		0x0f  /* set = pen inserted */
 #define SW_MAX			0x0f
 #define SW_CNT			(SW_MAX+1)
 
Signature · 1 line
2.8.0.rc3.226.g39d4020
maintainer Applied
#1 lore raw
Quoted 10 lines · Douglas Anderson

Some devices with a pen may have a switch that can be used to detect when the pen is inserted or removed to a slot on the device. Let's add a define to the input event codes so that everyone can be on the same page for what event we should generate when the pen is inserted or removed.

In general the pen switch could be used by the software on the device to kick off any number of actions when the pen is inserted or removed.

Applied, thank you.

Quoted 19 lines
---
 include/uapi/linux/input-event-codes.h | 1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/input-event-codes.h +1 -0
index 737fa32faad4..d6d071fc3c56 100644
@@ -780,6 +780,7 @@
 #define SW_ROTATE_LOCK		0x0c  /* set = rotate locked/disabled */
 #define SW_LINEIN_INSERT	0x0d  /* set = inserted */
 #define SW_MUTE_DEVICE		0x0e  /* set = device disabled */
+#define SW_PEN_INSERTED		0x0f  /* set = pen inserted */
 #define SW_MAX			0x0f
 #define SW_CNT			(SW_MAX+1)
 
Signature · 1 line
2.8.0.rc3.226.g39d4020
Signature · 1 line
Dmitry