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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20