Skip to content

Commit

Permalink
Input: add SW_PEN_INSERTED define
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Douglas Anderson authored and Dmitry Torokhov committed Jun 29, 2016
1 parent 60842ef commit 9a9b6aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/uapi/linux/input-event-codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 9a9b6aa

Please sign in to comment.