aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-22 13:23:46 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-22 13:23:46 -0400
commit74511020dde10252f8b8e648690d99dba721de14 (patch)
tree04fc22bc7dd5d5b8d9294b2e57985b093858bd84 /drivers/input/mouse
parent69266866a5790080d7fe80094b28d670ff8aa765 (diff)
parent3cc4e53f86dab635166929bfa47cc68d59b28c26 (diff)
Merge branch 'for-2.6.34' into for-2.6.35
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/alps.c49
-rw-r--r--drivers/input/mouse/appletouch.c6
2 files changed, 22 insertions, 33 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index f93c2c0daf1f..7490f1da4a53 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -63,6 +63,8 @@ static const struct alps_model_info alps_model_data[] = {
63 { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, 63 { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf,
64 ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, 64 ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED },
65 { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */ 65 { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */
66 { { 0x52, 0x01, 0x14 }, 0xff, 0xff,
67 ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */
66}; 68};
67 69
68/* 70/*
@@ -118,40 +120,27 @@ static void alps_report_buttons(struct psmouse *psmouse,
118 struct input_dev *dev1, struct input_dev *dev2, 120 struct input_dev *dev1, struct input_dev *dev2,
119 int left, int right, int middle) 121 int left, int right, int middle)
120{ 122{
121 struct alps_data *priv = psmouse->private; 123 struct input_dev *dev;
122 const struct alps_model_info *model = priv->i;
123
124 if (model->flags & ALPS_PS2_INTERLEAVED) {
125 struct input_dev *dev;
126 124
127 /* 125 /*
128 * If shared button has already been reported on the 126 * If shared button has already been reported on the
129 * other device (dev2) then this event should be also 127 * other device (dev2) then this event should be also
130 * sent through that device. 128 * sent through that device.
131 */ 129 */
132 dev = test_bit(BTN_LEFT, dev2->key) ? dev2 : dev1; 130 dev = test_bit(BTN_LEFT, dev2->key) ? dev2 : dev1;
133 input_report_key(dev, BTN_LEFT, left); 131 input_report_key(dev, BTN_LEFT, left);
134 132
135 dev = test_bit(BTN_RIGHT, dev2->key) ? dev2 : dev1; 133 dev = test_bit(BTN_RIGHT, dev2->key) ? dev2 : dev1;
136 input_report_key(dev, BTN_RIGHT, right); 134 input_report_key(dev, BTN_RIGHT, right);
137 135
138 dev = test_bit(BTN_MIDDLE, dev2->key) ? dev2 : dev1; 136 dev = test_bit(BTN_MIDDLE, dev2->key) ? dev2 : dev1;
139 input_report_key(dev, BTN_MIDDLE, middle); 137 input_report_key(dev, BTN_MIDDLE, middle);
140 138
141 /* 139 /*
142 * Sync the _other_ device now, we'll do the first 140 * Sync the _other_ device now, we'll do the first
143 * device later once we report the rest of the events. 141 * device later once we report the rest of the events.
144 */ 142 */
145 input_sync(dev2); 143 input_sync(dev2);
146 } else {
147 /*
148 * For devices with non-interleaved packets we know what
149 * device buttons belong to so we can simply report them.
150 */
151 input_report_key(dev1, BTN_LEFT, left);
152 input_report_key(dev1, BTN_RIGHT, right);
153 input_report_key(dev1, BTN_MIDDLE, middle);
154 }
155} 144}
156 145
157static void alps_process_packet(struct psmouse *psmouse) 146static void alps_process_packet(struct psmouse *psmouse)
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index 908b5b44052f..53ec7ddd1826 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -205,8 +205,8 @@ struct atp {
205 bool overflow_warned; 205 bool overflow_warned;
206 int x_old; /* last reported x/y, */ 206 int x_old; /* last reported x/y, */
207 int y_old; /* used for smoothing */ 207 int y_old; /* used for smoothing */
208 signed char xy_cur[ATP_XSENSORS + ATP_YSENSORS]; 208 u8 xy_cur[ATP_XSENSORS + ATP_YSENSORS];
209 signed char xy_old[ATP_XSENSORS + ATP_YSENSORS]; 209 u8 xy_old[ATP_XSENSORS + ATP_YSENSORS];
210 int xy_acc[ATP_XSENSORS + ATP_YSENSORS]; 210 int xy_acc[ATP_XSENSORS + ATP_YSENSORS];
211 int idlecount; /* number of empty packets */ 211 int idlecount; /* number of empty packets */
212 struct work_struct work; 212 struct work_struct work;
@@ -531,7 +531,7 @@ static void atp_complete_geyser_1_2(struct urb *urb)
531 531
532 for (i = 0; i < ATP_XSENSORS + ATP_YSENSORS; i++) { 532 for (i = 0; i < ATP_XSENSORS + ATP_YSENSORS; i++) {
533 /* accumulate the change */ 533 /* accumulate the change */
534 signed char change = dev->xy_old[i] - dev->xy_cur[i]; 534 int change = dev->xy_old[i] - dev->xy_cur[i];
535 dev->xy_acc[i] -= change; 535 dev->xy_acc[i] -= change;
536 536
537 /* prevent down drifting */ 537 /* prevent down drifting */