diff options
| author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2014-07-24 15:50:39 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-07-25 21:53:48 -0400 |
| commit | 422b0314b9f29a2c61d426fdaf1864556809ac1c (patch) | |
| tree | 79347abefd092c06f60232bee7d8f7a93669ea1e /drivers/input/tablet | |
| parent | 3116871f427386933a1fcd87e831ea664cbd0bf2 (diff) | |
Input: wacom - split out the pad device for DTUS
MSC_SERIAL can be safely removed from the pad device.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/tablet')
| -rw-r--r-- | drivers/input/tablet/wacom_wac.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 5aaa3d2e9afc..d3aef3af1921 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
| @@ -217,17 +217,13 @@ static int wacom_dtus_irq(struct wacom_wac *wacom) | |||
| 217 | "%s: received unknown report #%d", __func__, data[0]); | 217 | "%s: received unknown report #%d", __func__, data[0]); |
| 218 | return 0; | 218 | return 0; |
| 219 | } else if (data[0] == WACOM_REPORT_DTUSPAD) { | 219 | } else if (data[0] == WACOM_REPORT_DTUSPAD) { |
| 220 | input = wacom->pad_input; | ||
| 220 | input_report_key(input, BTN_0, (data[1] & 0x01)); | 221 | input_report_key(input, BTN_0, (data[1] & 0x01)); |
| 221 | input_report_key(input, BTN_1, (data[1] & 0x02)); | 222 | input_report_key(input, BTN_1, (data[1] & 0x02)); |
| 222 | input_report_key(input, BTN_2, (data[1] & 0x04)); | 223 | input_report_key(input, BTN_2, (data[1] & 0x04)); |
| 223 | input_report_key(input, BTN_3, (data[1] & 0x08)); | 224 | input_report_key(input, BTN_3, (data[1] & 0x08)); |
| 224 | input_report_abs(input, ABS_MISC, | 225 | input_report_abs(input, ABS_MISC, |
| 225 | data[1] & 0x0f ? PAD_DEVICE_ID : 0); | 226 | data[1] & 0x0f ? PAD_DEVICE_ID : 0); |
| 226 | /* | ||
| 227 | * Serial number is required when expresskeys are | ||
| 228 | * reported through pen interface. | ||
| 229 | */ | ||
| 230 | input_event(input, EV_MSC, MSC_SERIAL, 0xf0); | ||
| 231 | return 1; | 227 | return 1; |
| 232 | } else { | 228 | } else { |
| 233 | prox = data[1] & 0x80; | 229 | prox = data[1] & 0x80; |
| @@ -257,7 +253,6 @@ static int wacom_dtus_irq(struct wacom_wac *wacom) | |||
| 257 | wacom->id[0] = 0; | 253 | wacom->id[0] = 0; |
| 258 | input_report_key(input, wacom->tool[0], prox); | 254 | input_report_key(input, wacom->tool[0], prox); |
| 259 | input_report_abs(input, ABS_MISC, wacom->id[0]); | 255 | input_report_abs(input, ABS_MISC, wacom->id[0]); |
| 260 | input_event(input, EV_MSC, MSC_SERIAL, 1); | ||
| 261 | return 1; | 256 | return 1; |
| 262 | } | 257 | } |
| 263 | } | 258 | } |
| @@ -1615,7 +1610,6 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
| 1615 | struct wacom_wac *wacom_wac) | 1610 | struct wacom_wac *wacom_wac) |
| 1616 | { | 1611 | { |
| 1617 | struct wacom_features *features = &wacom_wac->features; | 1612 | struct wacom_features *features = &wacom_wac->features; |
| 1618 | int i; | ||
| 1619 | 1613 | ||
| 1620 | input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); | 1614 | input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |
| 1621 | 1615 | ||
| @@ -1765,11 +1759,6 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
| 1765 | case DTUS: | 1759 | case DTUS: |
| 1766 | case PL: | 1760 | case PL: |
| 1767 | case DTU: | 1761 | case DTU: |
| 1768 | if (features->type == DTUS) { | ||
| 1769 | input_set_capability(input_dev, EV_MSC, MSC_SERIAL); | ||
| 1770 | for (i = 0; i < 4; i++) | ||
| 1771 | __set_bit(BTN_0 + i, input_dev->keybit); | ||
| 1772 | } | ||
| 1773 | __set_bit(BTN_TOOL_PEN, input_dev->keybit); | 1762 | __set_bit(BTN_TOOL_PEN, input_dev->keybit); |
| 1774 | __set_bit(BTN_TOOL_RUBBER, input_dev->keybit); | 1763 | __set_bit(BTN_TOOL_RUBBER, input_dev->keybit); |
| 1775 | __set_bit(BTN_STYLUS, input_dev->keybit); | 1764 | __set_bit(BTN_STYLUS, input_dev->keybit); |
| @@ -1985,6 +1974,11 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, | |||
| 1985 | 1974 | ||
| 1986 | break; | 1975 | break; |
| 1987 | 1976 | ||
| 1977 | case DTUS: | ||
| 1978 | for (i = 0; i < 4; i++) | ||
| 1979 | __set_bit(BTN_0 + i, input_dev->keybit); | ||
| 1980 | break; | ||
| 1981 | |||
| 1988 | case INTUOSHT: | 1982 | case INTUOSHT: |
| 1989 | case BAMBOO_PT: | 1983 | case BAMBOO_PT: |
| 1990 | /* pad device is on the touch interface */ | 1984 | /* pad device is on the touch interface */ |
