aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/wacom_wac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/tablet/wacom_wac.c')
-rw-r--r--drivers/input/tablet/wacom_wac.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index cd3ed29e0801..89a96427faa0 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -832,12 +832,24 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len)
832 832
833 dbg("wacom_tpc_irq: received report #%d", data[0]); 833 dbg("wacom_tpc_irq: received report #%d", data[0]);
834 834
835 if (len == WACOM_PKGLEN_TPC1FG || data[0] == WACOM_REPORT_TPC1FG) 835 switch (len) {
836 return wacom_tpc_single_touch(wacom, len); 836 case WACOM_PKGLEN_TPC1FG:
837 else if (data[0] == WACOM_REPORT_TPC2FG) 837 return wacom_tpc_single_touch(wacom, len);
838 return wacom_tpc_mt_touch(wacom); 838
839 else if (data[0] == WACOM_REPORT_PENABLED) 839 case WACOM_PKGLEN_TPC2FG:
840 return wacom_tpc_pen(wacom); 840 return wacom_tpc_mt_touch(wacom);
841
842 default:
843 switch (data[0]) {
844 case WACOM_REPORT_TPC1FG:
845 case WACOM_REPORT_TPCHID:
846 case WACOM_REPORT_TPCST:
847 return wacom_tpc_single_touch(wacom, len);
848
849 case WACOM_REPORT_PENABLED:
850 return wacom_tpc_pen(wacom);
851 }
852 }
841 853
842 return 0; 854 return 0;
843} 855}
@@ -1317,7 +1329,7 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
1317 break; 1329 break;
1318 1330
1319 case TABLETPC2FG: 1331 case TABLETPC2FG:
1320 if (features->device_type == BTN_TOOL_DOUBLETAP) { 1332 if (features->device_type == BTN_TOOL_FINGER) {
1321 1333
1322 input_mt_init_slots(input_dev, 2); 1334 input_mt_init_slots(input_dev, 2);
1323 input_set_abs_params(input_dev, ABS_MT_TOOL_TYPE, 1335 input_set_abs_params(input_dev, ABS_MT_TOOL_TYPE,
@@ -1366,7 +1378,7 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
1366 1378
1367 __set_bit(INPUT_PROP_POINTER, input_dev->propbit); 1379 __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
1368 1380
1369 if (features->device_type == BTN_TOOL_DOUBLETAP) { 1381 if (features->device_type == BTN_TOOL_FINGER) {
1370 __set_bit(BTN_LEFT, input_dev->keybit); 1382 __set_bit(BTN_LEFT, input_dev->keybit);
1371 __set_bit(BTN_FORWARD, input_dev->keybit); 1383 __set_bit(BTN_FORWARD, input_dev->keybit);
1372 __set_bit(BTN_BACK, input_dev->keybit); 1384 __set_bit(BTN_BACK, input_dev->keybit);