diff options
| -rw-r--r-- | drivers/input/joystick/xpad.c | 1 | ||||
| -rw-r--r-- | drivers/input/mouse/elantech.c | 44 | ||||
| -rw-r--r-- | drivers/input/mouse/elantech.h | 1 | ||||
| -rw-r--r-- | drivers/input/serio/Kconfig | 3 | ||||
| -rw-r--r-- | drivers/input/tablet/wacom_wac.c | 10 |
5 files changed, 53 insertions, 6 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index fa061d46527f..75e3b102ce45 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
| @@ -167,6 +167,7 @@ static const struct xpad_device { | |||
| 167 | { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, | 167 | { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, |
| 168 | { 0x146b, 0x0601, "BigBen Interactive XBOX 360 Controller", 0, XTYPE_XBOX360 }, | 168 | { 0x146b, 0x0601, "BigBen Interactive XBOX 360 Controller", 0, XTYPE_XBOX360 }, |
| 169 | { 0x1689, 0xfd00, "Razer Onza Tournament Edition", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, | 169 | { 0x1689, 0xfd00, "Razer Onza Tournament Edition", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, |
| 170 | { 0x1689, 0xfd01, "Razer Onza Classic Edition", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, | ||
| 170 | { 0x1bad, 0x0002, "Harmonix Rock Band Guitar", 0, XTYPE_XBOX360 }, | 171 | { 0x1bad, 0x0002, "Harmonix Rock Band Guitar", 0, XTYPE_XBOX360 }, |
| 171 | { 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, | 172 | { 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, |
| 172 | { 0x1bad, 0xf016, "Mad Catz Xbox 360 Controller", 0, XTYPE_XBOX360 }, | 173 | { 0x1bad, 0xf016, "Mad Catz Xbox 360 Controller", 0, XTYPE_XBOX360 }, |
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 57b2637e153a..8551dcaf24db 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
| @@ -672,6 +672,7 @@ static int elantech_packet_check_v2(struct psmouse *psmouse) | |||
| 672 | */ | 672 | */ |
| 673 | static int elantech_packet_check_v3(struct psmouse *psmouse) | 673 | static int elantech_packet_check_v3(struct psmouse *psmouse) |
| 674 | { | 674 | { |
| 675 | struct elantech_data *etd = psmouse->private; | ||
| 675 | const u8 debounce_packet[] = { 0xc4, 0xff, 0xff, 0x02, 0xff, 0xff }; | 676 | const u8 debounce_packet[] = { 0xc4, 0xff, 0xff, 0x02, 0xff, 0xff }; |
| 676 | unsigned char *packet = psmouse->packet; | 677 | unsigned char *packet = psmouse->packet; |
| 677 | 678 | ||
| @@ -682,19 +683,48 @@ static int elantech_packet_check_v3(struct psmouse *psmouse) | |||
| 682 | if (!memcmp(packet, debounce_packet, sizeof(debounce_packet))) | 683 | if (!memcmp(packet, debounce_packet, sizeof(debounce_packet))) |
| 683 | return PACKET_DEBOUNCE; | 684 | return PACKET_DEBOUNCE; |
| 684 | 685 | ||
| 685 | if ((packet[0] & 0x0c) == 0x04 && (packet[3] & 0xcf) == 0x02) | 686 | /* |
| 686 | return PACKET_V3_HEAD; | 687 | * If the hardware flag 'crc_enabled' is set the packets have |
| 688 | * different signatures. | ||
| 689 | */ | ||
| 690 | if (etd->crc_enabled) { | ||
| 691 | if ((packet[3] & 0x09) == 0x08) | ||
| 692 | return PACKET_V3_HEAD; | ||
| 693 | |||
| 694 | if ((packet[3] & 0x09) == 0x09) | ||
| 695 | return PACKET_V3_TAIL; | ||
| 696 | } else { | ||
| 697 | if ((packet[0] & 0x0c) == 0x04 && (packet[3] & 0xcf) == 0x02) | ||
| 698 | return PACKET_V3_HEAD; | ||
| 687 | 699 | ||
| 688 | if ((packet[0] & 0x0c) == 0x0c && (packet[3] & 0xce) == 0x0c) | 700 | if ((packet[0] & 0x0c) == 0x0c && (packet[3] & 0xce) == 0x0c) |
| 689 | return PACKET_V3_TAIL; | 701 | return PACKET_V3_TAIL; |
| 702 | } | ||
| 690 | 703 | ||
| 691 | return PACKET_UNKNOWN; | 704 | return PACKET_UNKNOWN; |
| 692 | } | 705 | } |
| 693 | 706 | ||
| 694 | static int elantech_packet_check_v4(struct psmouse *psmouse) | 707 | static int elantech_packet_check_v4(struct psmouse *psmouse) |
| 695 | { | 708 | { |
| 709 | struct elantech_data *etd = psmouse->private; | ||
| 696 | unsigned char *packet = psmouse->packet; | 710 | unsigned char *packet = psmouse->packet; |
| 697 | unsigned char packet_type = packet[3] & 0x03; | 711 | unsigned char packet_type = packet[3] & 0x03; |
| 712 | bool sanity_check; | ||
| 713 | |||
| 714 | /* | ||
| 715 | * Sanity check based on the constant bits of a packet. | ||
| 716 | * The constant bits change depending on the value of | ||
| 717 | * the hardware flag 'crc_enabled' but are the same for | ||
| 718 | * every packet, regardless of the type. | ||
| 719 | */ | ||
| 720 | if (etd->crc_enabled) | ||
| 721 | sanity_check = ((packet[3] & 0x08) == 0x00); | ||
| 722 | else | ||
| 723 | sanity_check = ((packet[0] & 0x0c) == 0x04 && | ||
| 724 | (packet[3] & 0x1c) == 0x10); | ||
| 725 | |||
| 726 | if (!sanity_check) | ||
| 727 | return PACKET_UNKNOWN; | ||
| 698 | 728 | ||
| 699 | switch (packet_type) { | 729 | switch (packet_type) { |
| 700 | case 0: | 730 | case 0: |
| @@ -1313,6 +1343,12 @@ static int elantech_set_properties(struct elantech_data *etd) | |||
| 1313 | etd->reports_pressure = true; | 1343 | etd->reports_pressure = true; |
| 1314 | } | 1344 | } |
| 1315 | 1345 | ||
| 1346 | /* | ||
| 1347 | * The signatures of v3 and v4 packets change depending on the | ||
| 1348 | * value of this hardware flag. | ||
| 1349 | */ | ||
| 1350 | etd->crc_enabled = ((etd->fw_version & 0x4000) == 0x4000); | ||
| 1351 | |||
| 1316 | return 0; | 1352 | return 0; |
| 1317 | } | 1353 | } |
| 1318 | 1354 | ||
diff --git a/drivers/input/mouse/elantech.h b/drivers/input/mouse/elantech.h index 46db3be45ac9..036a04abaef7 100644 --- a/drivers/input/mouse/elantech.h +++ b/drivers/input/mouse/elantech.h | |||
| @@ -129,6 +129,7 @@ struct elantech_data { | |||
| 129 | bool paritycheck; | 129 | bool paritycheck; |
| 130 | bool jumpy_cursor; | 130 | bool jumpy_cursor; |
| 131 | bool reports_pressure; | 131 | bool reports_pressure; |
| 132 | bool crc_enabled; | ||
| 132 | unsigned char hw_version; | 133 | unsigned char hw_version; |
| 133 | unsigned int fw_version; | 134 | unsigned int fw_version; |
| 134 | unsigned int single_finger_reports; | 135 | unsigned int single_finger_reports; |
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig index 94c17c28d268..1e691a3a79cb 100644 --- a/drivers/input/serio/Kconfig +++ b/drivers/input/serio/Kconfig | |||
| @@ -22,7 +22,8 @@ config SERIO_I8042 | |||
| 22 | tristate "i8042 PC Keyboard controller" if EXPERT || !X86 | 22 | tristate "i8042 PC Keyboard controller" if EXPERT || !X86 |
| 23 | default y | 23 | default y |
| 24 | depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \ | 24 | depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \ |
| 25 | (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !S390 | 25 | (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !S390 && \ |
| 26 | !ARC | ||
| 26 | help | 27 | help |
| 27 | i8042 is the chip over which the standard AT keyboard and PS/2 | 28 | i8042 is the chip over which the standard AT keyboard and PS/2 |
| 28 | mouse are connected to the computer. If you use these devices, | 29 | mouse are connected to the computer. If you use these devices, |
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 384fbcd0cee0..f3e91f0b57ae 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
| @@ -2112,7 +2112,7 @@ static const struct wacom_features wacom_features_0xDA = | |||
| 2112 | { "Wacom Bamboo 2FG 4x5 SE", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, | 2112 | { "Wacom Bamboo 2FG 4x5 SE", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, |
| 2113 | 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, | 2113 | 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, |
| 2114 | .touch_max = 2 }; | 2114 | .touch_max = 2 }; |
| 2115 | static struct wacom_features wacom_features_0xDB = | 2115 | static const struct wacom_features wacom_features_0xDB = |
| 2116 | { "Wacom Bamboo 2FG 6x8 SE", WACOM_PKGLEN_BBFUN, 21648, 13700, 1023, | 2116 | { "Wacom Bamboo 2FG 6x8 SE", WACOM_PKGLEN_BBFUN, 21648, 13700, 1023, |
| 2117 | 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, | 2117 | 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, |
| 2118 | .touch_max = 2 }; | 2118 | .touch_max = 2 }; |
| @@ -2127,6 +2127,12 @@ static const struct wacom_features wacom_features_0xDF = | |||
| 2127 | { "Wacom Bamboo 16FG 6x8", WACOM_PKGLEN_BBPEN, 21648, 13700, 1023, | 2127 | { "Wacom Bamboo 16FG 6x8", WACOM_PKGLEN_BBPEN, 21648, 13700, 1023, |
| 2128 | 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, | 2128 | 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, |
| 2129 | .touch_max = 16 }; | 2129 | .touch_max = 16 }; |
| 2130 | static const struct wacom_features wacom_features_0x300 = | ||
| 2131 | { "Wacom Bamboo One S", WACOM_PKGLEN_BBPEN, 14720, 9225, 1023, | ||
| 2132 | 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 2133 | static const struct wacom_features wacom_features_0x301 = | ||
| 2134 | { "Wacom Bamboo One M", WACOM_PKGLEN_BBPEN, 21648, 13530, 1023, | ||
| 2135 | 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
| 2130 | static const struct wacom_features wacom_features_0x6004 = | 2136 | static const struct wacom_features wacom_features_0x6004 = |
| 2131 | { "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255, | 2137 | { "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255, |
| 2132 | 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | 2138 | 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
| @@ -2253,6 +2259,8 @@ const struct usb_device_id wacom_ids[] = { | |||
| 2253 | { USB_DEVICE_WACOM(0x100) }, | 2259 | { USB_DEVICE_WACOM(0x100) }, |
| 2254 | { USB_DEVICE_WACOM(0x101) }, | 2260 | { USB_DEVICE_WACOM(0x101) }, |
| 2255 | { USB_DEVICE_WACOM(0x10D) }, | 2261 | { USB_DEVICE_WACOM(0x10D) }, |
| 2262 | { USB_DEVICE_WACOM(0x300) }, | ||
| 2263 | { USB_DEVICE_WACOM(0x301) }, | ||
| 2256 | { USB_DEVICE_WACOM(0x304) }, | 2264 | { USB_DEVICE_WACOM(0x304) }, |
| 2257 | { USB_DEVICE_WACOM(0x4001) }, | 2265 | { USB_DEVICE_WACOM(0x4001) }, |
| 2258 | { USB_DEVICE_WACOM(0x47) }, | 2266 | { USB_DEVICE_WACOM(0x47) }, |
