diff options
| author | Kevin Cernekee <cernekee@gmail.com> | 2013-02-14 01:27:08 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-02-14 12:18:29 -0500 |
| commit | 1302bac33d9e88cd43e482191a806998f3ed43cc (patch) | |
| tree | 39614bfd84c2be08c39cfc75da3df0001057a46e /drivers/input/mouse | |
| parent | f85e5001cce0298a44e35e2f8acbf9abeadb6c03 (diff) | |
Input: ALPS - add support for "Rushmore" touchpads
Rushmore touchpads are found on Dell E6230/E6430/E6530. They use the V3
protocol with slightly tweaked init sequences and report formats.
The E7 report is 73 03 0a, and the EC report is 88 08 1d
Credits: Emmanuel Thome reported the MT bitmap changes.
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')
| -rw-r--r-- | drivers/input/mouse/alps.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 270b7deefe5b..bf2fa51853e3 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
| @@ -479,6 +479,14 @@ static void alps_decode_pinnacle(struct alps_fields *f, unsigned char *p) | |||
| 479 | alps_decode_buttons_v3(f, p); | 479 | alps_decode_buttons_v3(f, p); |
| 480 | } | 480 | } |
| 481 | 481 | ||
| 482 | static void alps_decode_rushmore(struct alps_fields *f, unsigned char *p) | ||
| 483 | { | ||
| 484 | alps_decode_pinnacle(f, p); | ||
| 485 | |||
| 486 | f->x_map |= (p[5] & 0x10) << 11; | ||
| 487 | f->y_map |= (p[5] & 0x20) << 6; | ||
| 488 | } | ||
| 489 | |||
| 482 | static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) | 490 | static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) |
| 483 | { | 491 | { |
| 484 | struct alps_data *priv = psmouse->private; | 492 | struct alps_data *priv = psmouse->private; |
| @@ -1329,6 +1337,40 @@ error: | |||
| 1329 | return -1; | 1337 | return -1; |
| 1330 | } | 1338 | } |
| 1331 | 1339 | ||
| 1340 | static int alps_hw_init_rushmore_v3(struct psmouse *psmouse) | ||
| 1341 | { | ||
| 1342 | struct ps2dev *ps2dev = &psmouse->ps2dev; | ||
| 1343 | int reg_val, ret = -1; | ||
| 1344 | |||
| 1345 | if (alps_enter_command_mode(psmouse, NULL) || | ||
| 1346 | alps_command_mode_read_reg(psmouse, 0xc2d9) == -1 || | ||
| 1347 | alps_command_mode_write_reg(psmouse, 0xc2cb, 0x00)) | ||
| 1348 | goto error; | ||
| 1349 | |||
| 1350 | reg_val = alps_command_mode_read_reg(psmouse, 0xc2c6); | ||
| 1351 | if (reg_val == -1) | ||
| 1352 | goto error; | ||
| 1353 | if (__alps_command_mode_write_reg(psmouse, reg_val & 0xfd)) | ||
| 1354 | goto error; | ||
| 1355 | |||
| 1356 | if (alps_command_mode_write_reg(psmouse, 0xc2c9, 0x64)) | ||
| 1357 | goto error; | ||
| 1358 | |||
| 1359 | /* enter absolute mode */ | ||
| 1360 | reg_val = alps_command_mode_read_reg(psmouse, 0xc2c4); | ||
| 1361 | if (reg_val == -1) | ||
| 1362 | goto error; | ||
| 1363 | if (__alps_command_mode_write_reg(psmouse, reg_val | 0x02)) | ||
| 1364 | goto error; | ||
| 1365 | |||
| 1366 | alps_exit_command_mode(psmouse); | ||
| 1367 | return ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE); | ||
| 1368 | |||
| 1369 | error: | ||
| 1370 | alps_exit_command_mode(psmouse); | ||
| 1371 | return ret; | ||
| 1372 | } | ||
| 1373 | |||
| 1332 | /* Must be in command mode when calling this function */ | 1374 | /* Must be in command mode when calling this function */ |
| 1333 | static int alps_absolute_mode_v4(struct psmouse *psmouse) | 1375 | static int alps_absolute_mode_v4(struct psmouse *psmouse) |
| 1334 | { | 1376 | { |
| @@ -1511,6 +1553,16 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) | |||
| 1511 | 1553 | ||
| 1512 | if (alps_match_table(psmouse, priv, e7, ec) == 0) { | 1554 | if (alps_match_table(psmouse, priv, e7, ec) == 0) { |
| 1513 | return 0; | 1555 | return 0; |
| 1556 | } else if (ec[0] == 0x88 && ec[1] == 0x08) { | ||
| 1557 | priv->proto_version = ALPS_PROTO_V3; | ||
| 1558 | alps_set_defaults(priv); | ||
| 1559 | |||
| 1560 | priv->hw_init = alps_hw_init_rushmore_v3; | ||
| 1561 | priv->decode_fields = alps_decode_rushmore; | ||
| 1562 | priv->x_bits = 16; | ||
| 1563 | priv->y_bits = 12; | ||
| 1564 | |||
| 1565 | return 0; | ||
| 1514 | } else if (ec[0] == 0x88 && ec[1] == 0x07 && | 1566 | } else if (ec[0] == 0x88 && ec[1] == 0x07 && |
| 1515 | ec[2] >= 0x90 && ec[2] <= 0x9d) { | 1567 | ec[2] >= 0x90 && ec[2] <= 0x9d) { |
| 1516 | priv->proto_version = ALPS_PROTO_V3; | 1568 | priv->proto_version = ALPS_PROTO_V3; |
