Input: surface3_spi - add surface pen support for Surface 3
authorStephen Just <stephenjust@gmail.com>
Fri, 27 May 2016 23:29:39 +0000 (16:29 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 27 May 2016 23:33:34 +0000 (16:33 -0700)
commit72fb4765ac9eea56a94282f29cdc70706f21494e
treee7b29fa306d0d2f093d2042d2cd92f47783c0cfc
parent427ee20610a7c252e99d08e08e70a4203c6059d0
Input: surface3_spi - add surface pen support for Surface 3

This change creates a second input device which will handle input from
a Surface Pen. The Surface Pen supplies a different packet header than
touch events, so it is simple to handle one or the other.

This patch handles both the newer Surface Pen with one button, and the
older variant with a second button to switch to Eraser mode.

Signed-off-by: Stephen Just <stephenjust@gmail.com>
Reviewed-and-tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/surface3_spi.c