/[linux-patches]/genpatches-2.6/trunk/3.0/2610_Input-ALPS-Add-protocol-version-field-in-alps_model.patch
Gentoo

Contents of /genpatches-2.6/trunk/3.0/2610_Input-ALPS-Add-protocol-version-field-in-alps_model.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1982 - (show annotations) (download)
Wed Sep 28 14:30:19 2011 UTC (6 years, 9 months ago) by mpagano
File size: 5262 byte(s)
Adding ALPS patches for new touchpads from Seth Forshee at Ubuntu
1 From bd161b52aed9877253b03ebc2fba5a1326c45c8d Mon Sep 17 00:00:00 2001
2 From: Seth Forshee <seth.forshee@canonical.com>
3 Date: Wed, 14 Sep 2011 11:40:38 -0500
4 Subject: [PATCH 3/8] Input: ALPS - Add protocol version field in alps_model_info
5
6 In preparation for adding support for more ALPS protocol versions,
7 add a field for the protocol version to the model info instead of
8 using a field in the flags.
9 ---
10 drivers/input/mouse/alps.c | 47 +++++++++++++++++++++----------------------
11 drivers/input/mouse/alps.h | 4 +++
12 2 files changed, 27 insertions(+), 24 deletions(-)
13
14 diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
15 index ad15e7c..572cb21 100644
16 --- a/drivers/input/mouse/alps.c
17 +++ b/drivers/input/mouse/alps.c
18 @@ -30,7 +30,6 @@
19 #define dbg(format, arg...) do {} while (0)
20 #endif
21
22 -#define ALPS_OLDPROTO 0x01 /* old style input */
23 #define ALPS_DUALPOINT 0x02 /* touchpad has trackstick */
24 #define ALPS_PASS 0x04 /* device has a pass-through port */
25
26 @@ -42,30 +41,30 @@
27 6-byte ALPS packet */
28
29 static const struct alps_model_info alps_model_data[] = {
30 - { { 0x32, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Toshiba Salellite Pro M10 */
31 - { { 0x33, 0x02, 0x0a }, 0x88, 0xf8, ALPS_OLDPROTO }, /* UMAX-530T */
32 - { { 0x53, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
33 - { { 0x53, 0x02, 0x14 }, 0xf8, 0xf8, 0 },
34 - { { 0x60, 0x03, 0xc8 }, 0xf8, 0xf8, 0 }, /* HP ze1115 */
35 - { { 0x63, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
36 - { { 0x63, 0x02, 0x14 }, 0xf8, 0xf8, 0 },
37 - { { 0x63, 0x02, 0x28 }, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Fujitsu Siemens S6010 */
38 - { { 0x63, 0x02, 0x3c }, 0x8f, 0x8f, ALPS_WHEEL }, /* Toshiba Satellite S2400-103 */
39 - { { 0x63, 0x02, 0x50 }, 0xef, 0xef, ALPS_FW_BK_1 }, /* NEC Versa L320 */
40 - { { 0x63, 0x02, 0x64 }, 0xf8, 0xf8, 0 },
41 - { { 0x63, 0x03, 0xc8 }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D800 */
42 - { { 0x73, 0x00, 0x0a }, 0xf8, 0xf8, ALPS_DUALPOINT }, /* ThinkPad R61 8918-5QG */
43 - { { 0x73, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
44 - { { 0x73, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Ahtec Laptop */
45 - { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
46 - { { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
47 - { { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
48 + { { 0x32, 0x02, 0x14 }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Toshiba Salellite Pro M10 */
49 + { { 0x33, 0x02, 0x0a }, ALPS_PROTO_V1, 0x88, 0xf8, 0 }, /* UMAX-530T */
50 + { { 0x53, 0x02, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
51 + { { 0x53, 0x02, 0x14 }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
52 + { { 0x60, 0x03, 0xc8 }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 }, /* HP ze1115 */
53 + { { 0x63, 0x02, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
54 + { { 0x63, 0x02, 0x14 }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
55 + { { 0x63, 0x02, 0x28 }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Fujitsu Siemens S6010 */
56 + { { 0x63, 0x02, 0x3c }, ALPS_PROTO_V2, 0x8f, 0x8f, ALPS_WHEEL }, /* Toshiba Satellite S2400-103 */
57 + { { 0x63, 0x02, 0x50 }, ALPS_PROTO_V2, 0xef, 0xef, ALPS_FW_BK_1 }, /* NEC Versa L320 */
58 + { { 0x63, 0x02, 0x64 }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
59 + { { 0x63, 0x03, 0xc8 }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D800 */
60 + { { 0x73, 0x00, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_DUALPOINT }, /* ThinkPad R61 8918-5QG */
61 + { { 0x73, 0x02, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
62 + { { 0x73, 0x02, 0x14 }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Ahtec Laptop */
63 + { { 0x20, 0x02, 0x0e }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
64 + { { 0x22, 0x02, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
65 + { { 0x22, 0x02, 0x14 }, ALPS_PROTO_V2, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
66 /* Dell Latitude E5500, E6400, E6500, Precision M4400 */
67 - { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf,
68 + { { 0x62, 0x02, 0x14 }, ALPS_PROTO_V2, 0xcf, 0xcf,
69 ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED },
70 - { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */
71 - { { 0x52, 0x01, 0x14 }, 0xff, 0xff,
72 - ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */
73 + { { 0x73, 0x02, 0x50 }, ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */
74 + { { 0x52, 0x01, 0x14 }, ALPS_PROTO_V2, 0xff, 0xff,
75 + ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */
76 };
77
78 /*
79 @@ -119,7 +118,7 @@ static void alps_process_packet(struct psmouse *psmouse)
80 int x, y, z, ges, fin, left, right, middle;
81 int back = 0, forward = 0;
82
83 - if (model->flags & ALPS_OLDPROTO) {
84 + if (model->proto_version == ALPS_PROTO_V1) {
85 left = packet[2] & 0x10;
86 right = packet[2] & 0x08;
87 middle = 0;
88 diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h
89 index 904ed8b..4ce9bba 100644
90 --- a/drivers/input/mouse/alps.h
91 +++ b/drivers/input/mouse/alps.h
92 @@ -12,8 +12,12 @@
93 #ifndef _ALPS_H
94 #define _ALPS_H
95
96 +#define ALPS_PROTO_V1 0
97 +#define ALPS_PROTO_V2 1
98 +
99 struct alps_model_info {
100 unsigned char signature[3];
101 + unsigned char proto_version;
102 unsigned char byte0, mask0;
103 unsigned char flags;
104 };
105 --
106 1.7.4.1
107

  ViewVC Help
Powered by ViewVC 1.1.20