diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-04-23 15:16:37 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-04-23 15:16:37 -0400 |
commit | f139b6c676c7e49b66016b28bf3f8ec5c54be891 (patch) | |
tree | 742f00e431dded1daf642b44f4c199b318f255dc /drivers/input/mouse/synaptics.c | |
parent | 21330b667070fd64b2340d8d31c1b0800df78ec8 (diff) | |
parent | d654788e98f74f2df8dfc6079fa314938f739486 (diff) |
Merge tag 'nfs-rdma-for-4.1-1' of git://git.linux-nfs.org/projects/anna/nfs-rdma
NFS: NFSoRDMA Client Changes
This patch series creates an operation vector for each of the different
memory registration modes. This should make it easier to one day increase
credit limit, rsize, and wsize.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'drivers/input/mouse/synaptics.c')
-rw-r--r-- | drivers/input/mouse/synaptics.c | 212 |
1 files changed, 157 insertions, 55 deletions
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index f2cceb6493a0..dda605836546 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -67,9 +67,6 @@ | |||
67 | #define X_MAX_POSITIVE 8176 | 67 | #define X_MAX_POSITIVE 8176 |
68 | #define Y_MAX_POSITIVE 8176 | 68 | #define Y_MAX_POSITIVE 8176 |
69 | 69 | ||
70 | /* maximum ABS_MT_POSITION displacement (in mm) */ | ||
71 | #define DMAX 10 | ||
72 | |||
73 | /***************************************************************************** | 70 | /***************************************************************************** |
74 | * Stuff we need even when we do not want native Synaptics support | 71 | * Stuff we need even when we do not want native Synaptics support |
75 | ****************************************************************************/ | 72 | ****************************************************************************/ |
@@ -123,32 +120,41 @@ void synaptics_reset(struct psmouse *psmouse) | |||
123 | 120 | ||
124 | static bool cr48_profile_sensor; | 121 | static bool cr48_profile_sensor; |
125 | 122 | ||
123 | #define ANY_BOARD_ID 0 | ||
126 | struct min_max_quirk { | 124 | struct min_max_quirk { |
127 | const char * const *pnp_ids; | 125 | const char * const *pnp_ids; |
126 | struct { | ||
127 | unsigned long int min, max; | ||
128 | } board_id; | ||
128 | int x_min, x_max, y_min, y_max; | 129 | int x_min, x_max, y_min, y_max; |
129 | }; | 130 | }; |
130 | 131 | ||
131 | static const struct min_max_quirk min_max_pnpid_table[] = { | 132 | static const struct min_max_quirk min_max_pnpid_table[] = { |
132 | { | 133 | { |
133 | (const char * const []){"LEN0033", NULL}, | 134 | (const char * const []){"LEN0033", NULL}, |
135 | {ANY_BOARD_ID, ANY_BOARD_ID}, | ||
134 | 1024, 5052, 2258, 4832 | 136 | 1024, 5052, 2258, 4832 |
135 | }, | 137 | }, |
136 | { | 138 | { |
137 | (const char * const []){"LEN0035", "LEN0042", NULL}, | 139 | (const char * const []){"LEN0042", NULL}, |
140 | {ANY_BOARD_ID, ANY_BOARD_ID}, | ||
138 | 1232, 5710, 1156, 4696 | 141 | 1232, 5710, 1156, 4696 |
139 | }, | 142 | }, |
140 | { | 143 | { |
141 | (const char * const []){"LEN0034", "LEN0036", "LEN0037", | 144 | (const char * const []){"LEN0034", "LEN0036", "LEN0037", |
142 | "LEN0039", "LEN2002", "LEN2004", | 145 | "LEN0039", "LEN2002", "LEN2004", |
143 | NULL}, | 146 | NULL}, |
147 | {ANY_BOARD_ID, 2961}, | ||
144 | 1024, 5112, 2024, 4832 | 148 | 1024, 5112, 2024, 4832 |
145 | }, | 149 | }, |
146 | { | 150 | { |
147 | (const char * const []){"LEN2001", NULL}, | 151 | (const char * const []){"LEN2001", NULL}, |
152 | {ANY_BOARD_ID, ANY_BOARD_ID}, | ||
148 | 1024, 5022, 2508, 4832 | 153 | 1024, 5022, 2508, 4832 |
149 | }, | 154 | }, |
150 | { | 155 | { |
151 | (const char * const []){"LEN2006", NULL}, | 156 | (const char * const []){"LEN2006", NULL}, |
157 | {ANY_BOARD_ID, ANY_BOARD_ID}, | ||
152 | 1264, 5675, 1171, 4688 | 158 | 1264, 5675, 1171, 4688 |
153 | }, | 159 | }, |
154 | { } | 160 | { } |
@@ -175,9 +181,7 @@ static const char * const topbuttonpad_pnp_ids[] = { | |||
175 | "LEN0041", | 181 | "LEN0041", |
176 | "LEN0042", /* Yoga */ | 182 | "LEN0042", /* Yoga */ |
177 | "LEN0045", | 183 | "LEN0045", |
178 | "LEN0046", | ||
179 | "LEN0047", | 184 | "LEN0047", |
180 | "LEN0048", | ||
181 | "LEN0049", | 185 | "LEN0049", |
182 | "LEN2000", | 186 | "LEN2000", |
183 | "LEN2001", /* Edge E431 */ | 187 | "LEN2001", /* Edge E431 */ |
@@ -235,18 +239,39 @@ static int synaptics_model_id(struct psmouse *psmouse) | |||
235 | return 0; | 239 | return 0; |
236 | } | 240 | } |
237 | 241 | ||
242 | static int synaptics_more_extended_queries(struct psmouse *psmouse) | ||
243 | { | ||
244 | struct synaptics_data *priv = psmouse->private; | ||
245 | unsigned char buf[3]; | ||
246 | |||
247 | if (synaptics_send_cmd(psmouse, SYN_QUE_MEXT_CAPAB_10, buf)) | ||
248 | return -1; | ||
249 | |||
250 | priv->ext_cap_10 = (buf[0]<<16) | (buf[1]<<8) | buf[2]; | ||
251 | |||
252 | return 0; | ||
253 | } | ||
254 | |||
238 | /* | 255 | /* |
239 | * Read the board id from the touchpad | 256 | * Read the board id and the "More Extended Queries" from the touchpad |
240 | * The board id is encoded in the "QUERY MODES" response | 257 | * The board id is encoded in the "QUERY MODES" response |
241 | */ | 258 | */ |
242 | static int synaptics_board_id(struct psmouse *psmouse) | 259 | static int synaptics_query_modes(struct psmouse *psmouse) |
243 | { | 260 | { |
244 | struct synaptics_data *priv = psmouse->private; | 261 | struct synaptics_data *priv = psmouse->private; |
245 | unsigned char bid[3]; | 262 | unsigned char bid[3]; |
246 | 263 | ||
264 | /* firmwares prior 7.5 have no board_id encoded */ | ||
265 | if (SYN_ID_FULL(priv->identity) < 0x705) | ||
266 | return 0; | ||
267 | |||
247 | if (synaptics_send_cmd(psmouse, SYN_QUE_MODES, bid)) | 268 | if (synaptics_send_cmd(psmouse, SYN_QUE_MODES, bid)) |
248 | return -1; | 269 | return -1; |
249 | priv->board_id = ((bid[0] & 0xfc) << 6) | bid[1]; | 270 | priv->board_id = ((bid[0] & 0xfc) << 6) | bid[1]; |
271 | |||
272 | if (SYN_MEXT_CAP_BIT(bid[0])) | ||
273 | return synaptics_more_extended_queries(psmouse); | ||
274 | |||
250 | return 0; | 275 | return 0; |
251 | } | 276 | } |
252 | 277 | ||
@@ -346,7 +371,6 @@ static int synaptics_resolution(struct psmouse *psmouse) | |||
346 | { | 371 | { |
347 | struct synaptics_data *priv = psmouse->private; | 372 | struct synaptics_data *priv = psmouse->private; |
348 | unsigned char resp[3]; | 373 | unsigned char resp[3]; |
349 | int i; | ||
350 | 374 | ||
351 | if (SYN_ID_MAJOR(priv->identity) < 4) | 375 | if (SYN_ID_MAJOR(priv->identity) < 4) |
352 | return 0; | 376 | return 0; |
@@ -358,17 +382,6 @@ static int synaptics_resolution(struct psmouse *psmouse) | |||
358 | } | 382 | } |
359 | } | 383 | } |
360 | 384 | ||
361 | for (i = 0; min_max_pnpid_table[i].pnp_ids; i++) { | ||
362 | if (psmouse_matches_pnp_id(psmouse, | ||
363 | min_max_pnpid_table[i].pnp_ids)) { | ||
364 | priv->x_min = min_max_pnpid_table[i].x_min; | ||
365 | priv->x_max = min_max_pnpid_table[i].x_max; | ||
366 | priv->y_min = min_max_pnpid_table[i].y_min; | ||
367 | priv->y_max = min_max_pnpid_table[i].y_max; | ||
368 | return 0; | ||
369 | } | ||
370 | } | ||
371 | |||
372 | if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 5 && | 385 | if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 5 && |
373 | SYN_CAP_MAX_DIMENSIONS(priv->ext_cap_0c)) { | 386 | SYN_CAP_MAX_DIMENSIONS(priv->ext_cap_0c)) { |
374 | if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_MAX_COORDS, resp)) { | 387 | if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_MAX_COORDS, resp)) { |
@@ -377,23 +390,69 @@ static int synaptics_resolution(struct psmouse *psmouse) | |||
377 | } else { | 390 | } else { |
378 | priv->x_max = (resp[0] << 5) | ((resp[1] & 0x0f) << 1); | 391 | priv->x_max = (resp[0] << 5) | ((resp[1] & 0x0f) << 1); |
379 | priv->y_max = (resp[2] << 5) | ((resp[1] & 0xf0) >> 3); | 392 | priv->y_max = (resp[2] << 5) | ((resp[1] & 0xf0) >> 3); |
393 | psmouse_info(psmouse, | ||
394 | "queried max coordinates: x [..%d], y [..%d]\n", | ||
395 | priv->x_max, priv->y_max); | ||
380 | } | 396 | } |
381 | } | 397 | } |
382 | 398 | ||
383 | if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 7 && | 399 | if (SYN_CAP_MIN_DIMENSIONS(priv->ext_cap_0c) && |
384 | SYN_CAP_MIN_DIMENSIONS(priv->ext_cap_0c)) { | 400 | (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 7 || |
401 | /* | ||
402 | * Firmware v8.1 does not report proper number of extended | ||
403 | * capabilities, but has been proven to report correct min | ||
404 | * coordinates. | ||
405 | */ | ||
406 | SYN_ID_FULL(priv->identity) == 0x801)) { | ||
385 | if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_MIN_COORDS, resp)) { | 407 | if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_MIN_COORDS, resp)) { |
386 | psmouse_warn(psmouse, | 408 | psmouse_warn(psmouse, |
387 | "device claims to have min coordinates query, but I'm not able to read it.\n"); | 409 | "device claims to have min coordinates query, but I'm not able to read it.\n"); |
388 | } else { | 410 | } else { |
389 | priv->x_min = (resp[0] << 5) | ((resp[1] & 0x0f) << 1); | 411 | priv->x_min = (resp[0] << 5) | ((resp[1] & 0x0f) << 1); |
390 | priv->y_min = (resp[2] << 5) | ((resp[1] & 0xf0) >> 3); | 412 | priv->y_min = (resp[2] << 5) | ((resp[1] & 0xf0) >> 3); |
413 | psmouse_info(psmouse, | ||
414 | "queried min coordinates: x [%d..], y [%d..]\n", | ||
415 | priv->x_min, priv->y_min); | ||
391 | } | 416 | } |
392 | } | 417 | } |
393 | 418 | ||
394 | return 0; | 419 | return 0; |
395 | } | 420 | } |
396 | 421 | ||
422 | /* | ||
423 | * Apply quirk(s) if the hardware matches | ||
424 | */ | ||
425 | |||
426 | static void synaptics_apply_quirks(struct psmouse *psmouse) | ||
427 | { | ||
428 | struct synaptics_data *priv = psmouse->private; | ||
429 | int i; | ||
430 | |||
431 | for (i = 0; min_max_pnpid_table[i].pnp_ids; i++) { | ||
432 | if (!psmouse_matches_pnp_id(psmouse, | ||
433 | min_max_pnpid_table[i].pnp_ids)) | ||
434 | continue; | ||
435 | |||
436 | if (min_max_pnpid_table[i].board_id.min != ANY_BOARD_ID && | ||
437 | priv->board_id < min_max_pnpid_table[i].board_id.min) | ||
438 | continue; | ||
439 | |||
440 | if (min_max_pnpid_table[i].board_id.max != ANY_BOARD_ID && | ||
441 | priv->board_id > min_max_pnpid_table[i].board_id.max) | ||
442 | continue; | ||
443 | |||
444 | priv->x_min = min_max_pnpid_table[i].x_min; | ||
445 | priv->x_max = min_max_pnpid_table[i].x_max; | ||
446 | priv->y_min = min_max_pnpid_table[i].y_min; | ||
447 | priv->y_max = min_max_pnpid_table[i].y_max; | ||
448 | psmouse_info(psmouse, | ||
449 | "quirked min/max coordinates: x [%d..%d], y [%d..%d]\n", | ||
450 | priv->x_min, priv->x_max, | ||
451 | priv->y_min, priv->y_max); | ||
452 | break; | ||
453 | } | ||
454 | } | ||
455 | |||
397 | static int synaptics_query_hardware(struct psmouse *psmouse) | 456 | static int synaptics_query_hardware(struct psmouse *psmouse) |
398 | { | 457 | { |
399 | if (synaptics_identify(psmouse)) | 458 | if (synaptics_identify(psmouse)) |
@@ -402,13 +461,15 @@ static int synaptics_query_hardware(struct psmouse *psmouse) | |||
402 | return -1; | 461 | return -1; |
403 | if (synaptics_firmware_id(psmouse)) | 462 | if (synaptics_firmware_id(psmouse)) |
404 | return -1; | 463 | return -1; |
405 | if (synaptics_board_id(psmouse)) | 464 | if (synaptics_query_modes(psmouse)) |
406 | return -1; | 465 | return -1; |
407 | if (synaptics_capability(psmouse)) | 466 | if (synaptics_capability(psmouse)) |
408 | return -1; | 467 | return -1; |
409 | if (synaptics_resolution(psmouse)) | 468 | if (synaptics_resolution(psmouse)) |
410 | return -1; | 469 | return -1; |
411 | 470 | ||
471 | synaptics_apply_quirks(psmouse); | ||
472 | |||
412 | return 0; | 473 | return 0; |
413 | } | 474 | } |
414 | 475 | ||
@@ -516,18 +577,22 @@ static int synaptics_is_pt_packet(unsigned char *buf) | |||
516 | return (buf[0] & 0xFC) == 0x84 && (buf[3] & 0xCC) == 0xC4; | 577 | return (buf[0] & 0xFC) == 0x84 && (buf[3] & 0xCC) == 0xC4; |
517 | } | 578 | } |
518 | 579 | ||
519 | static void synaptics_pass_pt_packet(struct serio *ptport, unsigned char *packet) | 580 | static void synaptics_pass_pt_packet(struct psmouse *psmouse, |
581 | struct serio *ptport, | ||
582 | unsigned char *packet) | ||
520 | { | 583 | { |
584 | struct synaptics_data *priv = psmouse->private; | ||
521 | struct psmouse *child = serio_get_drvdata(ptport); | 585 | struct psmouse *child = serio_get_drvdata(ptport); |
522 | 586 | ||
523 | if (child && child->state == PSMOUSE_ACTIVATED) { | 587 | if (child && child->state == PSMOUSE_ACTIVATED) { |
524 | serio_interrupt(ptport, packet[1], 0); | 588 | serio_interrupt(ptport, packet[1] | priv->pt_buttons, 0); |
525 | serio_interrupt(ptport, packet[4], 0); | 589 | serio_interrupt(ptport, packet[4], 0); |
526 | serio_interrupt(ptport, packet[5], 0); | 590 | serio_interrupt(ptport, packet[5], 0); |
527 | if (child->pktsize == 4) | 591 | if (child->pktsize == 4) |
528 | serio_interrupt(ptport, packet[2], 0); | 592 | serio_interrupt(ptport, packet[2], 0); |
529 | } else | 593 | } else { |
530 | serio_interrupt(ptport, packet[1], 0); | 594 | serio_interrupt(ptport, packet[1], 0); |
595 | } | ||
531 | } | 596 | } |
532 | 597 | ||
533 | static void synaptics_pt_activate(struct psmouse *psmouse) | 598 | static void synaptics_pt_activate(struct psmouse *psmouse) |
@@ -605,6 +670,18 @@ static void synaptics_parse_agm(const unsigned char buf[], | |||
605 | } | 670 | } |
606 | } | 671 | } |
607 | 672 | ||
673 | static void synaptics_parse_ext_buttons(const unsigned char buf[], | ||
674 | struct synaptics_data *priv, | ||
675 | struct synaptics_hw_state *hw) | ||
676 | { | ||
677 | unsigned int ext_bits = | ||
678 | (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap) + 1) >> 1; | ||
679 | unsigned int ext_mask = GENMASK(ext_bits - 1, 0); | ||
680 | |||
681 | hw->ext_buttons = buf[4] & ext_mask; | ||
682 | hw->ext_buttons |= (buf[5] & ext_mask) << ext_bits; | ||
683 | } | ||
684 | |||
608 | static bool is_forcepad; | 685 | static bool is_forcepad; |
609 | 686 | ||
610 | static int synaptics_parse_hw_state(const unsigned char buf[], | 687 | static int synaptics_parse_hw_state(const unsigned char buf[], |
@@ -691,28 +768,9 @@ static int synaptics_parse_hw_state(const unsigned char buf[], | |||
691 | hw->down = ((buf[0] ^ buf[3]) & 0x02) ? 1 : 0; | 768 | hw->down = ((buf[0] ^ buf[3]) & 0x02) ? 1 : 0; |
692 | } | 769 | } |
693 | 770 | ||
694 | if (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap) && | 771 | if (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap) > 0 && |
695 | ((buf[0] ^ buf[3]) & 0x02)) { | 772 | ((buf[0] ^ buf[3]) & 0x02)) { |
696 | switch (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap) & ~0x01) { | 773 | synaptics_parse_ext_buttons(buf, priv, hw); |
697 | default: | ||
698 | /* | ||
699 | * if nExtBtn is greater than 8 it should be | ||
700 | * considered invalid and treated as 0 | ||
701 | */ | ||
702 | break; | ||
703 | case 8: | ||
704 | hw->ext_buttons |= ((buf[5] & 0x08)) ? 0x80 : 0; | ||
705 | hw->ext_buttons |= ((buf[4] & 0x08)) ? 0x40 : 0; | ||
706 | case 6: | ||
707 | hw->ext_buttons |= ((buf[5] & 0x04)) ? 0x20 : 0; | ||
708 | hw->ext_buttons |= ((buf[4] & 0x04)) ? 0x10 : 0; | ||
709 | case 4: | ||
710 | hw->ext_buttons |= ((buf[5] & 0x02)) ? 0x08 : 0; | ||
711 | hw->ext_buttons |= ((buf[4] & 0x02)) ? 0x04 : 0; | ||
712 | case 2: | ||
713 | hw->ext_buttons |= ((buf[5] & 0x01)) ? 0x02 : 0; | ||
714 | hw->ext_buttons |= ((buf[4] & 0x01)) ? 0x01 : 0; | ||
715 | } | ||
716 | } | 774 | } |
717 | } else { | 775 | } else { |
718 | hw->x = (((buf[1] & 0x1f) << 8) | buf[2]); | 776 | hw->x = (((buf[1] & 0x1f) << 8) | buf[2]); |
@@ -774,12 +832,54 @@ static void synaptics_report_semi_mt_data(struct input_dev *dev, | |||
774 | } | 832 | } |
775 | } | 833 | } |
776 | 834 | ||
835 | static void synaptics_report_ext_buttons(struct psmouse *psmouse, | ||
836 | const struct synaptics_hw_state *hw) | ||
837 | { | ||
838 | struct input_dev *dev = psmouse->dev; | ||
839 | struct synaptics_data *priv = psmouse->private; | ||
840 | int ext_bits = (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap) + 1) >> 1; | ||
841 | char buf[6] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; | ||
842 | int i; | ||
843 | |||
844 | if (!SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap)) | ||
845 | return; | ||
846 | |||
847 | /* Bug in FW 8.1, buttons are reported only when ExtBit is 1 */ | ||
848 | if (SYN_ID_FULL(priv->identity) == 0x801 && | ||
849 | !((psmouse->packet[0] ^ psmouse->packet[3]) & 0x02)) | ||
850 | return; | ||
851 | |||
852 | if (!SYN_CAP_EXT_BUTTONS_STICK(priv->ext_cap_10)) { | ||
853 | for (i = 0; i < ext_bits; i++) { | ||
854 | input_report_key(dev, BTN_0 + 2 * i, | ||
855 | hw->ext_buttons & (1 << i)); | ||
856 | input_report_key(dev, BTN_1 + 2 * i, | ||
857 | hw->ext_buttons & (1 << (i + ext_bits))); | ||
858 | } | ||
859 | return; | ||
860 | } | ||
861 | |||
862 | /* | ||
863 | * This generation of touchpads has the trackstick buttons | ||
864 | * physically wired to the touchpad. Re-route them through | ||
865 | * the pass-through interface. | ||
866 | */ | ||
867 | if (!priv->pt_port) | ||
868 | return; | ||
869 | |||
870 | /* The trackstick expects at most 3 buttons */ | ||
871 | priv->pt_buttons = SYN_CAP_EXT_BUTTON_STICK_L(hw->ext_buttons) | | ||
872 | SYN_CAP_EXT_BUTTON_STICK_R(hw->ext_buttons) << 1 | | ||
873 | SYN_CAP_EXT_BUTTON_STICK_M(hw->ext_buttons) << 2; | ||
874 | |||
875 | synaptics_pass_pt_packet(psmouse, priv->pt_port, buf); | ||
876 | } | ||
877 | |||
777 | static void synaptics_report_buttons(struct psmouse *psmouse, | 878 | static void synaptics_report_buttons(struct psmouse *psmouse, |
778 | const struct synaptics_hw_state *hw) | 879 | const struct synaptics_hw_state *hw) |
779 | { | 880 | { |
780 | struct input_dev *dev = psmouse->dev; | 881 | struct input_dev *dev = psmouse->dev; |
781 | struct synaptics_data *priv = psmouse->private; | 882 | struct synaptics_data *priv = psmouse->private; |
782 | int i; | ||
783 | 883 | ||
784 | input_report_key(dev, BTN_LEFT, hw->left); | 884 | input_report_key(dev, BTN_LEFT, hw->left); |
785 | input_report_key(dev, BTN_RIGHT, hw->right); | 885 | input_report_key(dev, BTN_RIGHT, hw->right); |
@@ -792,8 +892,7 @@ static void synaptics_report_buttons(struct psmouse *psmouse, | |||
792 | input_report_key(dev, BTN_BACK, hw->down); | 892 | input_report_key(dev, BTN_BACK, hw->down); |
793 | } | 893 | } |
794 | 894 | ||
795 | for (i = 0; i < SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap); i++) | 895 | synaptics_report_ext_buttons(psmouse, hw); |
796 | input_report_key(dev, BTN_0 + i, hw->ext_buttons & (1 << i)); | ||
797 | } | 896 | } |
798 | 897 | ||
799 | static void synaptics_report_mt_data(struct psmouse *psmouse, | 898 | static void synaptics_report_mt_data(struct psmouse *psmouse, |
@@ -813,7 +912,7 @@ static void synaptics_report_mt_data(struct psmouse *psmouse, | |||
813 | pos[i].y = synaptics_invert_y(hw[i]->y); | 912 | pos[i].y = synaptics_invert_y(hw[i]->y); |
814 | } | 913 | } |
815 | 914 | ||
816 | input_mt_assign_slots(dev, slot, pos, nsemi, DMAX * priv->x_res); | 915 | input_mt_assign_slots(dev, slot, pos, nsemi, 0); |
817 | 916 | ||
818 | for (i = 0; i < nsemi; i++) { | 917 | for (i = 0; i < nsemi; i++) { |
819 | input_mt_slot(dev, slot[i]); | 918 | input_mt_slot(dev, slot[i]); |
@@ -1014,7 +1113,8 @@ static psmouse_ret_t synaptics_process_byte(struct psmouse *psmouse) | |||
1014 | if (SYN_CAP_PASS_THROUGH(priv->capabilities) && | 1113 | if (SYN_CAP_PASS_THROUGH(priv->capabilities) && |
1015 | synaptics_is_pt_packet(psmouse->packet)) { | 1114 | synaptics_is_pt_packet(psmouse->packet)) { |
1016 | if (priv->pt_port) | 1115 | if (priv->pt_port) |
1017 | synaptics_pass_pt_packet(priv->pt_port, psmouse->packet); | 1116 | synaptics_pass_pt_packet(psmouse, priv->pt_port, |
1117 | psmouse->packet); | ||
1018 | } else | 1118 | } else |
1019 | synaptics_process_packet(psmouse); | 1119 | synaptics_process_packet(psmouse); |
1020 | 1120 | ||
@@ -1116,8 +1216,9 @@ static void set_input_params(struct psmouse *psmouse, | |||
1116 | __set_bit(BTN_BACK, dev->keybit); | 1216 | __set_bit(BTN_BACK, dev->keybit); |
1117 | } | 1217 | } |
1118 | 1218 | ||
1119 | for (i = 0; i < SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap); i++) | 1219 | if (!SYN_CAP_EXT_BUTTONS_STICK(priv->ext_cap_10)) |
1120 | __set_bit(BTN_0 + i, dev->keybit); | 1220 | for (i = 0; i < SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap); i++) |
1221 | __set_bit(BTN_0 + i, dev->keybit); | ||
1121 | 1222 | ||
1122 | __clear_bit(EV_REL, dev->evbit); | 1223 | __clear_bit(EV_REL, dev->evbit); |
1123 | __clear_bit(REL_X, dev->relbit); | 1224 | __clear_bit(REL_X, dev->relbit); |
@@ -1125,7 +1226,8 @@ static void set_input_params(struct psmouse *psmouse, | |||
1125 | 1226 | ||
1126 | if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { | 1227 | if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { |
1127 | __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit); | 1228 | __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit); |
1128 | if (psmouse_matches_pnp_id(psmouse, topbuttonpad_pnp_ids)) | 1229 | if (psmouse_matches_pnp_id(psmouse, topbuttonpad_pnp_ids) && |
1230 | !SYN_CAP_EXT_BUTTONS_STICK(priv->ext_cap_10)) | ||
1129 | __set_bit(INPUT_PROP_TOPBUTTONPAD, dev->propbit); | 1231 | __set_bit(INPUT_PROP_TOPBUTTONPAD, dev->propbit); |
1130 | /* Clickpads report only left button */ | 1232 | /* Clickpads report only left button */ |
1131 | __clear_bit(BTN_RIGHT, dev->keybit); | 1233 | __clear_bit(BTN_RIGHT, dev->keybit); |