aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-06-06 12:08:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-06 12:08:23 -0400
commitf46c5818b1570f58b1b7dc69e49060a6b9a1ac94 (patch)
tree6ce7ad7ef4b05baafab8028077dabf8e573a9322
parent77493bd9b2c9b1e07c2d9ccc481ed4dfc7ef2d1c (diff)
parent088df2ccef75754cc16a6ba31829d23bcb2b68ed (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem fixes from Dmitry Torokhov: "Just a couple touchpad drivers fixups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: alps - do not reduce trackpoint speed by half Input: elantech - add new icbody type Input: elantech - fix detection of touchpads where the revision matches a known rate
-rw-r--r--drivers/input/mouse/alps.c5
-rw-r--r--drivers/input/mouse/elantech.c8
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 7752bd59d4b7..a353b7de6d22 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -1063,9 +1063,8 @@ static void alps_process_trackstick_packet_v7(struct psmouse *psmouse)
1063 right = (packet[1] & 0x02) >> 1; 1063 right = (packet[1] & 0x02) >> 1;
1064 middle = (packet[1] & 0x04) >> 2; 1064 middle = (packet[1] & 0x04) >> 2;
1065 1065
1066 /* Divide 2 since trackpoint's speed is too fast */ 1066 input_report_rel(dev2, REL_X, (char)x);
1067 input_report_rel(dev2, REL_X, (char)x / 2); 1067 input_report_rel(dev2, REL_Y, -((char)y));
1068 input_report_rel(dev2, REL_Y, -((char)y / 2));
1069 1068
1070 input_report_key(dev2, BTN_LEFT, left); 1069 input_report_key(dev2, BTN_LEFT, left);
1071 input_report_key(dev2, BTN_RIGHT, right); 1070 input_report_key(dev2, BTN_RIGHT, right);
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 79363b687195..ce3d40004458 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1376,10 +1376,11 @@ static bool elantech_is_signature_valid(const unsigned char *param)
1376 return true; 1376 return true;
1377 1377
1378 /* 1378 /*
1379 * Some models have a revision higher then 20. Meaning param[2] may 1379 * Some hw_version >= 4 models have a revision higher then 20. Meaning
1380 * be 10 or 20, skip the rates check for these. 1380 * that param[2] may be 10 or 20, skip the rates check for these.
1381 */ 1381 */
1382 if (param[0] == 0x46 && (param[1] & 0xef) == 0x0f && param[2] < 40) 1382 if ((param[0] & 0x0f) >= 0x06 && (param[1] & 0xaf) == 0x0f &&
1383 param[2] < 40)
1383 return true; 1384 return true;
1384 1385
1385 for (i = 0; i < ARRAY_SIZE(rates); i++) 1386 for (i = 0; i < ARRAY_SIZE(rates); i++)
@@ -1555,6 +1556,7 @@ static int elantech_set_properties(struct elantech_data *etd)
1555 case 9: 1556 case 9:
1556 case 10: 1557 case 10:
1557 case 13: 1558 case 13:
1559 case 14:
1558 etd->hw_version = 4; 1560 etd->hw_version = 4;
1559 break; 1561 break;
1560 default: 1562 default: