diff options
author | Kevin Cernekee <cernekee@gmail.com> | 2013-02-14 01:23:34 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-02-14 12:18:11 -0500 |
commit | f673ceb11b880e8535476326612e54c3e0cace5b (patch) | |
tree | bb482c8461b0c299124e5e52e7d207d2b4dc94d9 /drivers/input/mouse/alps.c | |
parent | 50e8b2162feb851f5af1372ba996640ad8d66fc9 (diff) |
Input: ALPS - rework detection of Pinnacle AGx touchpads
The official ALPS driver uses the EC report, not the E7 report, to detect
these devices. Also, they check for a range of values; the original
table-based code only checked for two specific ones.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r-- | drivers/input/mouse/alps.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 2221a00b25d3..eafeae279356 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -109,8 +109,6 @@ static const struct alps_model_info alps_model_data[] = { | |||
109 | { { 0x73, 0x02, 0x50 }, 0x00, ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */ | 109 | { { 0x73, 0x02, 0x50 }, 0x00, ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */ |
110 | { { 0x52, 0x01, 0x14 }, 0x00, ALPS_PROTO_V2, 0xff, 0xff, | 110 | { { 0x52, 0x01, 0x14 }, 0x00, ALPS_PROTO_V2, 0xff, 0xff, |
111 | ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */ | 111 | ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */ |
112 | { { 0x73, 0x02, 0x64 }, 0x9b, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT }, | ||
113 | { { 0x73, 0x02, 0x64 }, 0x9d, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT }, | ||
114 | { { 0x73, 0x02, 0x64 }, 0x8a, ALPS_PROTO_V4, 0x8f, 0x8f, 0 }, | 112 | { { 0x73, 0x02, 0x64 }, 0x8a, ALPS_PROTO_V4, 0x8f, 0x8f, 0 }, |
115 | }; | 113 | }; |
116 | 114 | ||
@@ -1412,6 +1410,10 @@ error: | |||
1412 | 1410 | ||
1413 | static void alps_set_defaults(struct alps_data *priv) | 1411 | static void alps_set_defaults(struct alps_data *priv) |
1414 | { | 1412 | { |
1413 | priv->byte0 = 0x8f; | ||
1414 | priv->mask0 = 0x8f; | ||
1415 | priv->flags = ALPS_DUALPOINT; | ||
1416 | |||
1415 | switch (priv->proto_version) { | 1417 | switch (priv->proto_version) { |
1416 | case ALPS_PROTO_V1: | 1418 | case ALPS_PROTO_V1: |
1417 | case ALPS_PROTO_V2: | 1419 | case ALPS_PROTO_V2: |
@@ -1491,8 +1493,15 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) | |||
1491 | alps_exit_command_mode(psmouse)) | 1493 | alps_exit_command_mode(psmouse)) |
1492 | return -EIO; | 1494 | return -EIO; |
1493 | 1495 | ||
1494 | if (alps_match_table(psmouse, priv, e7, ec) == 0) | 1496 | if (alps_match_table(psmouse, priv, e7, ec) == 0) { |
1497 | return 0; | ||
1498 | } else if (ec[0] == 0x88 && ec[1] == 0x07 && | ||
1499 | ec[2] >= 0x90 && ec[2] <= 0x9d) { | ||
1500 | priv->proto_version = ALPS_PROTO_V3; | ||
1501 | alps_set_defaults(priv); | ||
1502 | |||
1495 | return 0; | 1503 | return 0; |
1504 | } | ||
1496 | 1505 | ||
1497 | psmouse_info(psmouse, | 1506 | psmouse_info(psmouse, |
1498 | "Unknown ALPS touchpad: E7=%2.2x %2.2x %2.2x, EC=%2.2x %2.2x %2.2x\n", | 1507 | "Unknown ALPS touchpad: E7=%2.2x %2.2x %2.2x, EC=%2.2x %2.2x %2.2x\n", |