aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/mouse/alps.c29
-rw-r--r--drivers/input/mouse/alps.h1
2 files changed, 19 insertions, 11 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 92a886b0eca4..720fb6682f31 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -99,7 +99,6 @@ static const struct alps_nibble_commands alps_v6_nibble_commands[] = {
99#define ALPS_FOUR_BUTTONS 0x40 /* 4 direction button present */ 99#define ALPS_FOUR_BUTTONS 0x40 /* 4 direction button present */
100#define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with 100#define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with
101 6-byte ALPS packet */ 101 6-byte ALPS packet */
102#define ALPS_IS_RUSHMORE 0x100 /* device is a rushmore */
103#define ALPS_BUTTONPAD 0x200 /* device is a clickpad */ 102#define ALPS_BUTTONPAD 0x200 /* device is a clickpad */
104 103
105static const struct alps_model_info alps_model_data[] = { 104static const struct alps_model_info alps_model_data[] = {
@@ -412,7 +411,7 @@ static int alps_process_bitmap(struct alps_data *priv,
412 (2 * (priv->y_bits - 1)); 411 (2 * (priv->y_bits - 1));
413 412
414 /* y-bitmap order is reversed, except on rushmore */ 413 /* y-bitmap order is reversed, except on rushmore */
415 if (!(priv->flags & ALPS_IS_RUSHMORE)) { 414 if (priv->proto_version != ALPS_PROTO_V3_RUSHMORE) {
416 fields->mt[0].y = priv->y_max - fields->mt[0].y; 415 fields->mt[0].y = priv->y_max - fields->mt[0].y;
417 fields->mt[1].y = priv->y_max - fields->mt[1].y; 416 fields->mt[1].y = priv->y_max - fields->mt[1].y;
418 } 417 }
@@ -648,7 +647,8 @@ static void alps_process_touchpad_packet_v3_v5(struct psmouse *psmouse)
648 */ 647 */
649 if (f->is_mp) { 648 if (f->is_mp) {
650 fingers = f->fingers; 649 fingers = f->fingers;
651 if (priv->proto_version == ALPS_PROTO_V3) { 650 if (priv->proto_version == ALPS_PROTO_V3 ||
651 priv->proto_version == ALPS_PROTO_V3_RUSHMORE) {
652 if (alps_process_bitmap(priv, f) == 0) 652 if (alps_process_bitmap(priv, f) == 0)
653 fingers = 0; /* Use st data */ 653 fingers = 0; /* Use st data */
654 654
@@ -1275,7 +1275,7 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse)
1275 psmouse->pktcnt - 1, 1275 psmouse->pktcnt - 1,
1276 psmouse->packet[psmouse->pktcnt - 1]); 1276 psmouse->packet[psmouse->pktcnt - 1]);
1277 1277
1278 if (priv->proto_version == ALPS_PROTO_V3 && 1278 if (priv->proto_version == ALPS_PROTO_V3_RUSHMORE &&
1279 psmouse->pktcnt == psmouse->pktsize) { 1279 psmouse->pktcnt == psmouse->pktsize) {
1280 /* 1280 /*
1281 * Some Dell boxes, such as Latitude E6440 or E7440 1281 * Some Dell boxes, such as Latitude E6440 or E7440
@@ -2182,6 +2182,7 @@ static void alps_set_defaults(struct alps_data *priv)
2182 priv->x_max = 1023; 2182 priv->x_max = 1023;
2183 priv->y_max = 767; 2183 priv->y_max = 767;
2184 break; 2184 break;
2185
2185 case ALPS_PROTO_V3: 2186 case ALPS_PROTO_V3:
2186 priv->hw_init = alps_hw_init_v3; 2187 priv->hw_init = alps_hw_init_v3;
2187 priv->process_packet = alps_process_packet_v3; 2188 priv->process_packet = alps_process_packet_v3;
@@ -2190,6 +2191,18 @@ static void alps_set_defaults(struct alps_data *priv)
2190 priv->nibble_commands = alps_v3_nibble_commands; 2191 priv->nibble_commands = alps_v3_nibble_commands;
2191 priv->addr_command = PSMOUSE_CMD_RESET_WRAP; 2192 priv->addr_command = PSMOUSE_CMD_RESET_WRAP;
2192 break; 2193 break;
2194
2195 case ALPS_PROTO_V3_RUSHMORE:
2196 priv->hw_init = alps_hw_init_rushmore_v3;
2197 priv->process_packet = alps_process_packet_v3;
2198 priv->set_abs_params = alps_set_abs_params_mt;
2199 priv->decode_fields = alps_decode_rushmore;
2200 priv->nibble_commands = alps_v3_nibble_commands;
2201 priv->addr_command = PSMOUSE_CMD_RESET_WRAP;
2202 priv->x_bits = 16;
2203 priv->y_bits = 12;
2204 break;
2205
2193 case ALPS_PROTO_V4: 2206 case ALPS_PROTO_V4:
2194 priv->hw_init = alps_hw_init_v4; 2207 priv->hw_init = alps_hw_init_v4;
2195 priv->process_packet = alps_process_packet_v4; 2208 priv->process_packet = alps_process_packet_v4;
@@ -2313,15 +2326,9 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)
2313 2326
2314 return 0; 2327 return 0;
2315 } else if (ec[0] == 0x88 && ec[1] == 0x08) { 2328 } else if (ec[0] == 0x88 && ec[1] == 0x08) {
2316 priv->proto_version = ALPS_PROTO_V3; 2329 priv->proto_version = ALPS_PROTO_V3_RUSHMORE;
2317 alps_set_defaults(priv); 2330 alps_set_defaults(priv);
2318 2331
2319 priv->hw_init = alps_hw_init_rushmore_v3;
2320 priv->decode_fields = alps_decode_rushmore;
2321 priv->x_bits = 16;
2322 priv->y_bits = 12;
2323 priv->flags |= ALPS_IS_RUSHMORE;
2324
2325 /* hack to make addr_command, nibble_command available */ 2332 /* hack to make addr_command, nibble_command available */
2326 psmouse->private = priv; 2333 psmouse->private = priv;
2327 2334
diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h
index 94645bfa2a0d..f19908abfb15 100644
--- a/drivers/input/mouse/alps.h
+++ b/drivers/input/mouse/alps.h
@@ -17,6 +17,7 @@
17#define ALPS_PROTO_V1 0x100 17#define ALPS_PROTO_V1 0x100
18#define ALPS_PROTO_V2 0x200 18#define ALPS_PROTO_V2 0x200
19#define ALPS_PROTO_V3 0x300 19#define ALPS_PROTO_V3 0x300
20#define ALPS_PROTO_V3_RUSHMORE 0x310
20#define ALPS_PROTO_V4 0x400 21#define ALPS_PROTO_V4 0x400
21#define ALPS_PROTO_V5 0x500 22#define ALPS_PROTO_V5 0x500
22#define ALPS_PROTO_V6 0x600 23#define ALPS_PROTO_V6 0x600