aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/alps.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-20 13:17:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-20 13:17:02 -0400
commit93db6294958f62643a917e44d1abc85440e600cf (patch)
tree33de2c41b0f70d209d64487d1a2bba6d673015ef /drivers/input/mouse/alps.c
parent43813f399c72aa22e01a680559c1cb5274bf2140 (diff)
parenteef3e4cab72eaf5345e3c73b2975c194a714f6cd (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits) Input: add driver for Synaptics I2C touchpad Input: synaptics - add support for reporting x/y resolution Input: ALPS - handle touchpoints buttons correctly Input: gpio-keys - change timer to workqueue Input: ads7846 - pin change interrupt support Input: add support for touchscreen on W90P910 ARM platform Input: appletouch - improve finger detection Input: wacom - clear Intuos4 wheel data when finger leaves proximity Input: ucb1400 - move static function from header into core Input: add driver for EETI touchpanels Input: ads7846 - more detailed model name in sysfs Input: ads7846 - support swapping x and y axes Input: ati_remote2 - use non-atomic bitops Input: introduce lm8323 keypad driver Input: psmouse - ESD workaround fix for OLPC XO touchpad Input: tsc2007 - make sure platform provides get_pendown_state() Input: uinput - flush all pending ff effects before destroying device Input: simplify name handling for certain input handles Input: serio - do not use deprecated dev.power.power_state Input: wacom - add support for Intuos4 tablets ...
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r--drivers/input/mouse/alps.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index daecc75c72e6..5547e2429fbe 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -38,25 +38,25 @@
38 38
39static const struct alps_model_info alps_model_data[] = { 39static const struct alps_model_info alps_model_data[] = {
40 { { 0x32, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Toshiba Salellite Pro M10 */ 40 { { 0x32, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Toshiba Salellite Pro M10 */
41 { { 0x33, 0x02, 0x0a }, 0x88, 0xf8, ALPS_OLDPROTO }, /* UMAX-530T */ 41 { { 0x33, 0x02, 0x0a }, 0x88, 0xf8, ALPS_OLDPROTO }, /* UMAX-530T */
42 { { 0x53, 0x02, 0x0a }, 0xf8, 0xf8, 0 }, 42 { { 0x53, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
43 { { 0x53, 0x02, 0x14 }, 0xf8, 0xf8, 0 }, 43 { { 0x53, 0x02, 0x14 }, 0xf8, 0xf8, 0 },
44 { { 0x60, 0x03, 0xc8 }, 0xf8, 0xf8, 0 }, /* HP ze1115 */ 44 { { 0x60, 0x03, 0xc8 }, 0xf8, 0xf8, 0 }, /* HP ze1115 */
45 { { 0x63, 0x02, 0x0a }, 0xf8, 0xf8, 0 }, 45 { { 0x63, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
46 { { 0x63, 0x02, 0x14 }, 0xf8, 0xf8, 0 }, 46 { { 0x63, 0x02, 0x14 }, 0xf8, 0xf8, 0 },
47 { { 0x63, 0x02, 0x28 }, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Fujitsu Siemens S6010 */ 47 { { 0x63, 0x02, 0x28 }, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Fujitsu Siemens S6010 */
48 { { 0x63, 0x02, 0x3c }, 0x8f, 0x8f, ALPS_WHEEL }, /* Toshiba Satellite S2400-103 */ 48 { { 0x63, 0x02, 0x3c }, 0x8f, 0x8f, ALPS_WHEEL }, /* Toshiba Satellite S2400-103 */
49 { { 0x63, 0x02, 0x50 }, 0xef, 0xef, ALPS_FW_BK_1 }, /* NEC Versa L320 */ 49 { { 0x63, 0x02, 0x50 }, 0xef, 0xef, ALPS_FW_BK_1 }, /* NEC Versa L320 */
50 { { 0x63, 0x02, 0x64 }, 0xf8, 0xf8, 0 }, 50 { { 0x63, 0x02, 0x64 }, 0xf8, 0xf8, 0 },
51 { { 0x63, 0x03, 0xc8 }, 0xf8, 0xf8, ALPS_PASS }, /* Dell Latitude D800 */ 51 { { 0x63, 0x03, 0xc8 }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D800 */
52 { { 0x73, 0x00, 0x0a }, 0xf8, 0xf8, ALPS_DUALPOINT }, /* ThinkPad R61 8918-5QG */ 52 { { 0x73, 0x00, 0x0a }, 0xf8, 0xf8, ALPS_DUALPOINT }, /* ThinkPad R61 8918-5QG */
53 { { 0x73, 0x02, 0x0a }, 0xf8, 0xf8, 0 }, 53 { { 0x73, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
54 { { 0x73, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Ahtec Laptop */ 54 { { 0x73, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Ahtec Laptop */
55 { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */ 55 { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
56 { { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, 56 { { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
57 { { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */ 57 { { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
58 { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude E6500 */ 58 { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude E6500 */
59 { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FW_BK_1 } /* Dell Vostro 1400 */ 59 { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FW_BK_1 }, /* Dell Vostro 1400 */
60}; 60};
61 61
62/* 62/*
@@ -132,18 +132,23 @@ static void alps_process_packet(struct psmouse *psmouse)
132 ges = packet[2] & 1; 132 ges = packet[2] & 1;
133 fin = packet[2] & 2; 133 fin = packet[2] & 2;
134 134
135 input_report_key(dev, BTN_LEFT, left);
136 input_report_key(dev, BTN_RIGHT, right);
137 input_report_key(dev, BTN_MIDDLE, middle);
138
139 if ((priv->i->flags & ALPS_DUALPOINT) && z == 127) { 135 if ((priv->i->flags & ALPS_DUALPOINT) && z == 127) {
140 input_report_rel(dev2, REL_X, (x > 383 ? (x - 768) : x)); 136 input_report_rel(dev2, REL_X, (x > 383 ? (x - 768) : x));
141 input_report_rel(dev2, REL_Y, -(y > 255 ? (y - 512) : y)); 137 input_report_rel(dev2, REL_Y, -(y > 255 ? (y - 512) : y));
138
139 input_report_key(dev2, BTN_LEFT, left);
140 input_report_key(dev2, BTN_RIGHT, right);
141 input_report_key(dev2, BTN_MIDDLE, middle);
142
142 input_sync(dev); 143 input_sync(dev);
143 input_sync(dev2); 144 input_sync(dev2);
144 return; 145 return;
145 } 146 }
146 147
148 input_report_key(dev, BTN_LEFT, left);
149 input_report_key(dev, BTN_RIGHT, right);
150 input_report_key(dev, BTN_MIDDLE, middle);
151
147 /* Convert hardware tap to a reasonable Z value */ 152 /* Convert hardware tap to a reasonable Z value */
148 if (ges && !fin) z = 40; 153 if (ges && !fin) z = 40;
149 154