Commit 0bd10ef8 authored by Ping Cheng's avatar Ping Cheng Committed by Dmitry Torokhov

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: default avatarPing Cheng <pingc@wacom.com>
Reviewed-by: default avatarChris Bagwell <chris@cnpbagwell.com>
Reviewed-by: default avatarHenrik Rydberg <rydberg@euromail.se>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 998c454e
...@@ -275,8 +275,8 @@ static int wacom_graphire_irq(struct wacom_wac *wacom) ...@@ -275,8 +275,8 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)
prox = data[7] & 0xf8; prox = data[7] & 0xf8;
if (prox || wacom->id[1]) { if (prox || wacom->id[1]) {
wacom->id[1] = PAD_DEVICE_ID; wacom->id[1] = PAD_DEVICE_ID;
input_report_key(input, BTN_0, (data[7] & 0x40)); input_report_key(input, BTN_BACK, (data[7] & 0x40));
input_report_key(input, BTN_4, (data[7] & 0x80)); input_report_key(input, BTN_FORWARD, (data[7] & 0x80));
rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3);
input_report_rel(input, REL_WHEEL, rw); input_report_rel(input, REL_WHEEL, rw);
if (!prox) if (!prox)
...@@ -291,10 +291,10 @@ static int wacom_graphire_irq(struct wacom_wac *wacom) ...@@ -291,10 +291,10 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)
prox = (data[7] & 0xf8) || data[8]; prox = (data[7] & 0xf8) || data[8];
if (prox || wacom->id[1]) { if (prox || wacom->id[1]) {
wacom->id[1] = PAD_DEVICE_ID; wacom->id[1] = PAD_DEVICE_ID;
input_report_key(input, BTN_0, (data[7] & 0x08)); input_report_key(input, BTN_BACK, (data[7] & 0x08));
input_report_key(input, BTN_1, (data[7] & 0x20)); input_report_key(input, BTN_LEFT, (data[7] & 0x20));
input_report_key(input, BTN_4, (data[7] & 0x10)); input_report_key(input, BTN_FORWARD, (data[7] & 0x10));
input_report_key(input, BTN_5, (data[7] & 0x40)); input_report_key(input, BTN_RIGHT, (data[7] & 0x40));
input_report_abs(input, ABS_WHEEL, (data[8] & 0x7f)); input_report_abs(input, ABS_WHEEL, (data[8] & 0x7f));
if (!prox) if (!prox)
wacom->id[1] = 0; wacom->id[1] = 0;
...@@ -1076,17 +1076,14 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, ...@@ -1076,17 +1076,14 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
switch (wacom_wac->features.type) { switch (wacom_wac->features.type) {
case WACOM_MO: case WACOM_MO:
__set_bit(BTN_1, input_dev->keybit);
__set_bit(BTN_5, input_dev->keybit);
input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0);
/* fall through */ /* fall through */
case WACOM_G4: case WACOM_G4:
input_set_capability(input_dev, EV_MSC, MSC_SERIAL); input_set_capability(input_dev, EV_MSC, MSC_SERIAL);
__set_bit(BTN_0, input_dev->keybit); __set_bit(BTN_BACK, input_dev->keybit);
__set_bit(BTN_4, input_dev->keybit); __set_bit(BTN_FORWARD, input_dev->keybit);
/* fall through */ /* fall through */
case GRAPHIRE: case GRAPHIRE:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment