aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorPing Cheng <pinglinux@gmail.com>2011-07-06 21:05:42 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-07-07 00:24:25 -0400
commit0bd10ef8f8a29d824561a4678f5e63350751407a (patch)
tree960bae219b27e72633b660dc75bc41514d7c2912 /drivers/input
parent998c454e1c850f8e5cc0ae2299c4789b395d6d98 (diff)
Input: wacom - update Graphire4 and old Bamboo tablet buttons
Bamboo touch sets BTN_BACK, BTN_FORWARD, BTN_LEFT, and BTN_RIGHT as the default button events for tablet buttons. Change Graphire4 and old Bamboo to the same settings. Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/tablet/wacom_wac.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index b93501a3f9e8..19554a430170 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -275,8 +275,8 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)
275 prox = data[7] & 0xf8; 275 prox = data[7] & 0xf8;
276 if (prox || wacom->id[1]) { 276 if (prox || wacom->id[1]) {
277 wacom->id[1] = PAD_DEVICE_ID; 277 wacom->id[1] = PAD_DEVICE_ID;
278 input_report_key(input, BTN_0, (data[7] & 0x40)); 278 input_report_key(input, BTN_BACK, (data[7] & 0x40));
279 input_report_key(input, BTN_4, (data[7] & 0x80)); 279 input_report_key(input, BTN_FORWARD, (data[7] & 0x80));
280 rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); 280 rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3);
281 input_report_rel(input, REL_WHEEL, rw); 281 input_report_rel(input, REL_WHEEL, rw);
282 if (!prox) 282 if (!prox)
@@ -291,10 +291,10 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)
291 prox = (data[7] & 0xf8) || data[8]; 291 prox = (data[7] & 0xf8) || data[8];
292 if (prox || wacom->id[1]) { 292 if (prox || wacom->id[1]) {
293 wacom->id[1] = PAD_DEVICE_ID; 293 wacom->id[1] = PAD_DEVICE_ID;
294 input_report_key(input, BTN_0, (data[7] & 0x08)); 294 input_report_key(input, BTN_BACK, (data[7] & 0x08));
295 input_report_key(input, BTN_1, (data[7] & 0x20)); 295 input_report_key(input, BTN_LEFT, (data[7] & 0x20));
296 input_report_key(input, BTN_4, (data[7] & 0x10)); 296 input_report_key(input, BTN_FORWARD, (data[7] & 0x10));
297 input_report_key(input, BTN_5, (data[7] & 0x40)); 297 input_report_key(input, BTN_RIGHT, (data[7] & 0x40));
298 input_report_abs(input, ABS_WHEEL, (data[8] & 0x7f)); 298 input_report_abs(input, ABS_WHEEL, (data[8] & 0x7f));
299 if (!prox) 299 if (!prox)
300 wacom->id[1] = 0; 300 wacom->id[1] = 0;
@@ -1076,17 +1076,14 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
1076 1076
1077 switch (wacom_wac->features.type) { 1077 switch (wacom_wac->features.type) {
1078 case WACOM_MO: 1078 case WACOM_MO:
1079 __set_bit(BTN_1, input_dev->keybit);
1080 __set_bit(BTN_5, input_dev->keybit);
1081
1082 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); 1079 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
1083 /* fall through */ 1080 /* fall through */
1084 1081
1085 case WACOM_G4: 1082 case WACOM_G4:
1086 input_set_capability(input_dev, EV_MSC, MSC_SERIAL); 1083 input_set_capability(input_dev, EV_MSC, MSC_SERIAL);
1087 1084
1088 __set_bit(BTN_0, input_dev->keybit); 1085 __set_bit(BTN_BACK, input_dev->keybit);
1089 __set_bit(BTN_4, input_dev->keybit); 1086 __set_bit(BTN_FORWARD, input_dev->keybit);
1090 /* fall through */ 1087 /* fall through */
1091 1088
1092 case GRAPHIRE: 1089 case GRAPHIRE: