diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-01-15 12:46:14 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-01-15 12:46:14 -0500 |
| commit | 0c49cd295d42d0032af11d55e2140dbec11dc8d0 (patch) | |
| tree | 1e7d0e50b6b6d6e4de1fb6bb0b6d856c3932da58 /drivers/input/mouse | |
| parent | 0c3e99437a66e4c869c60c2398449e6d98f3a988 (diff) | |
| parent | eaa27f34e91a14cdceed26ed6c6793ec1d186115 (diff) | |
Merge tag 'v3.19-rc4' into next
Merge with mainline to bring in the latest thermal and other changes.
Diffstat (limited to 'drivers/input/mouse')
| -rw-r--r-- | drivers/input/mouse/alps.c | 32 | ||||
| -rw-r--r-- | drivers/input/mouse/amimouse.c | 1 | ||||
| -rw-r--r-- | drivers/input/mouse/elantech.c | 64 | ||||
| -rw-r--r-- | drivers/input/mouse/gpio_mouse.c | 1 | ||||
| -rw-r--r-- | drivers/input/mouse/navpoint.c | 1 | ||||
| -rw-r--r-- | drivers/input/mouse/psmouse-base.c | 7 | ||||
| -rw-r--r-- | drivers/input/mouse/synaptics.c | 9 | ||||
| -rw-r--r-- | drivers/input/mouse/vsxxxaa.c | 2 |
8 files changed, 89 insertions, 28 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index dd2fd397466a..f719f28d370c 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
| @@ -846,8 +846,8 @@ static void alps_process_packet_v4(struct psmouse *psmouse) | |||
| 846 | f->fingers = alps_process_bitmap(priv, f); | 846 | f->fingers = alps_process_bitmap(priv, f); |
| 847 | } | 847 | } |
| 848 | 848 | ||
| 849 | f->left = packet[4] & 0x01; | 849 | f->left = !!(packet[4] & 0x01); |
| 850 | f->right = packet[4] & 0x02; | 850 | f->right = !!(packet[4] & 0x02); |
| 851 | 851 | ||
| 852 | f->st.x = ((packet[1] & 0x7f) << 4) | ((packet[3] & 0x30) >> 2) | | 852 | f->st.x = ((packet[1] & 0x7f) << 4) | ((packet[3] & 0x30) >> 2) | |
| 853 | ((packet[0] & 0x30) >> 4); | 853 | ((packet[0] & 0x30) >> 4); |
| @@ -1238,7 +1238,13 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) | |||
| 1238 | { | 1238 | { |
| 1239 | struct alps_data *priv = psmouse->private; | 1239 | struct alps_data *priv = psmouse->private; |
| 1240 | 1240 | ||
| 1241 | if ((psmouse->packet[0] & 0xc8) == 0x08) { /* PS/2 packet */ | 1241 | /* |
| 1242 | * Check if we are dealing with a bare PS/2 packet, presumably from | ||
| 1243 | * a device connected to the external PS/2 port. Because bare PS/2 | ||
| 1244 | * protocol does not have enough constant bits to self-synchronize | ||
| 1245 | * properly we only do this if the device is fully synchronized. | ||
| 1246 | */ | ||
| 1247 | if (!psmouse->out_of_sync_cnt && (psmouse->packet[0] & 0xc8) == 0x08) { | ||
| 1242 | if (psmouse->pktcnt == 3) { | 1248 | if (psmouse->pktcnt == 3) { |
| 1243 | alps_report_bare_ps2_packet(psmouse, psmouse->packet, | 1249 | alps_report_bare_ps2_packet(psmouse, psmouse->packet, |
| 1244 | true); | 1250 | true); |
| @@ -1262,12 +1268,27 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) | |||
| 1262 | } | 1268 | } |
| 1263 | 1269 | ||
| 1264 | /* Bytes 2 - pktsize should have 0 in the highest bit */ | 1270 | /* Bytes 2 - pktsize should have 0 in the highest bit */ |
| 1265 | if ((priv->proto_version < ALPS_PROTO_V5) && | 1271 | if (priv->proto_version < ALPS_PROTO_V5 && |
| 1266 | psmouse->pktcnt >= 2 && psmouse->pktcnt <= psmouse->pktsize && | 1272 | psmouse->pktcnt >= 2 && psmouse->pktcnt <= psmouse->pktsize && |
| 1267 | (psmouse->packet[psmouse->pktcnt - 1] & 0x80)) { | 1273 | (psmouse->packet[psmouse->pktcnt - 1] & 0x80)) { |
| 1268 | psmouse_dbg(psmouse, "refusing packet[%i] = %x\n", | 1274 | psmouse_dbg(psmouse, "refusing packet[%i] = %x\n", |
| 1269 | psmouse->pktcnt - 1, | 1275 | psmouse->pktcnt - 1, |
| 1270 | psmouse->packet[psmouse->pktcnt - 1]); | 1276 | psmouse->packet[psmouse->pktcnt - 1]); |
| 1277 | |||
| 1278 | if (priv->proto_version == ALPS_PROTO_V3 && | ||
| 1279 | psmouse->pktcnt == psmouse->pktsize) { | ||
| 1280 | /* | ||
| 1281 | * Some Dell boxes, such as Latitude E6440 or E7440 | ||
| 1282 | * with closed lid, quite often smash last byte of | ||
| 1283 | * otherwise valid packet with 0xff. Given that the | ||
| 1284 | * next packet is very likely to be valid let's | ||
| 1285 | * report PSMOUSE_FULL_PACKET but not process data, | ||
| 1286 | * rather than reporting PSMOUSE_BAD_DATA and | ||
| 1287 | * filling the logs. | ||
| 1288 | */ | ||
| 1289 | return PSMOUSE_FULL_PACKET; | ||
| 1290 | } | ||
| 1291 | |||
| 1271 | return PSMOUSE_BAD_DATA; | 1292 | return PSMOUSE_BAD_DATA; |
| 1272 | } | 1293 | } |
| 1273 | 1294 | ||
| @@ -2481,6 +2502,9 @@ int alps_init(struct psmouse *psmouse) | |||
| 2481 | /* We are having trouble resyncing ALPS touchpads so disable it for now */ | 2502 | /* We are having trouble resyncing ALPS touchpads so disable it for now */ |
| 2482 | psmouse->resync_time = 0; | 2503 | psmouse->resync_time = 0; |
| 2483 | 2504 | ||
| 2505 | /* Allow 2 invalid packets without resetting device */ | ||
| 2506 | psmouse->resetafter = psmouse->pktsize * 2; | ||
| 2507 | |||
| 2484 | return 0; | 2508 | return 0; |
| 2485 | 2509 | ||
| 2486 | init_fail: | 2510 | init_fail: |
diff --git a/drivers/input/mouse/amimouse.c b/drivers/input/mouse/amimouse.c index 62ec52b2e347..a7fd8f22ba56 100644 --- a/drivers/input/mouse/amimouse.c +++ b/drivers/input/mouse/amimouse.c | |||
| @@ -141,7 +141,6 @@ static struct platform_driver amimouse_driver = { | |||
| 141 | .remove = __exit_p(amimouse_remove), | 141 | .remove = __exit_p(amimouse_remove), |
| 142 | .driver = { | 142 | .driver = { |
| 143 | .name = "amiga-mouse", | 143 | .name = "amiga-mouse", |
| 144 | .owner = THIS_MODULE, | ||
| 145 | }, | 144 | }, |
| 146 | }; | 145 | }; |
| 147 | 146 | ||
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 06fc6e76ffbe..f2b978026407 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
| @@ -428,14 +428,6 @@ static void elantech_report_trackpoint(struct psmouse *psmouse, | |||
| 428 | int x, y; | 428 | int x, y; |
| 429 | u32 t; | 429 | u32 t; |
| 430 | 430 | ||
| 431 | if (dev_WARN_ONCE(&psmouse->ps2dev.serio->dev, | ||
| 432 | !tp_dev, | ||
| 433 | psmouse_fmt("Unexpected trackpoint message\n"))) { | ||
| 434 | if (etd->debug == 1) | ||
| 435 | elantech_packet_dump(psmouse); | ||
| 436 | return; | ||
| 437 | } | ||
| 438 | |||
| 439 | t = get_unaligned_le32(&packet[0]); | 431 | t = get_unaligned_le32(&packet[0]); |
| 440 | 432 | ||
| 441 | switch (t & ~7U) { | 433 | switch (t & ~7U) { |
| @@ -563,6 +555,7 @@ static void elantech_input_sync_v4(struct psmouse *psmouse) | |||
| 563 | } else { | 555 | } else { |
| 564 | input_report_key(dev, BTN_LEFT, packet[0] & 0x01); | 556 | input_report_key(dev, BTN_LEFT, packet[0] & 0x01); |
| 565 | input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); | 557 | input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); |
| 558 | input_report_key(dev, BTN_MIDDLE, packet[0] & 0x04); | ||
| 566 | } | 559 | } |
| 567 | 560 | ||
| 568 | input_mt_report_pointer_emulation(dev, true); | 561 | input_mt_report_pointer_emulation(dev, true); |
| @@ -792,6 +785,9 @@ static int elantech_packet_check_v4(struct psmouse *psmouse) | |||
| 792 | unsigned char packet_type = packet[3] & 0x03; | 785 | unsigned char packet_type = packet[3] & 0x03; |
| 793 | bool sanity_check; | 786 | bool sanity_check; |
| 794 | 787 | ||
| 788 | if (etd->tp_dev && (packet[3] & 0x0f) == 0x06) | ||
| 789 | return PACKET_TRACKPOINT; | ||
| 790 | |||
| 795 | /* | 791 | /* |
| 796 | * Sanity check based on the constant bits of a packet. | 792 | * Sanity check based on the constant bits of a packet. |
| 797 | * The constant bits change depending on the value of | 793 | * The constant bits change depending on the value of |
| @@ -877,10 +873,19 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse) | |||
| 877 | 873 | ||
| 878 | case 4: | 874 | case 4: |
| 879 | packet_type = elantech_packet_check_v4(psmouse); | 875 | packet_type = elantech_packet_check_v4(psmouse); |
| 880 | if (packet_type == PACKET_UNKNOWN) | 876 | switch (packet_type) { |
| 877 | case PACKET_UNKNOWN: | ||
| 881 | return PSMOUSE_BAD_DATA; | 878 | return PSMOUSE_BAD_DATA; |
| 882 | 879 | ||
| 883 | elantech_report_absolute_v4(psmouse, packet_type); | 880 | case PACKET_TRACKPOINT: |
| 881 | elantech_report_trackpoint(psmouse, packet_type); | ||
| 882 | break; | ||
| 883 | |||
| 884 | default: | ||
| 885 | elantech_report_absolute_v4(psmouse, packet_type); | ||
| 886 | break; | ||
| 887 | } | ||
| 888 | |||
| 884 | break; | 889 | break; |
| 885 | } | 890 | } |
| 886 | 891 | ||
| @@ -1120,6 +1125,22 @@ static void elantech_set_buttonpad_prop(struct psmouse *psmouse) | |||
| 1120 | } | 1125 | } |
| 1121 | 1126 | ||
| 1122 | /* | 1127 | /* |
| 1128 | * Some hw_version 4 models do have a middle button | ||
| 1129 | */ | ||
| 1130 | static const struct dmi_system_id elantech_dmi_has_middle_button[] = { | ||
| 1131 | #if defined(CONFIG_DMI) && defined(CONFIG_X86) | ||
| 1132 | { | ||
| 1133 | /* Fujitsu H730 has a middle button */ | ||
| 1134 | .matches = { | ||
| 1135 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | ||
| 1136 | DMI_MATCH(DMI_PRODUCT_NAME, "CELSIUS H730"), | ||
| 1137 | }, | ||
| 1138 | |||
