diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/evdev.c | 4 | ||||
-rw-r--r-- | drivers/input/keyboard/bf54x-keys.c | 3 | ||||
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 1 | ||||
-rw-r--r-- | drivers/input/misc/cobalt_btns.c | 3 | ||||
-rw-r--r-- | drivers/input/mouse/bcm5974.c | 74 | ||||
-rw-r--r-- | drivers/input/mouse/gpio_mouse.c | 1 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 2 | ||||
-rw-r--r-- | drivers/input/tablet/gtco.c | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/mainstone-wm97xx.c | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/migor_ts.c | 11 | ||||
-rw-r--r-- | drivers/input/touchscreen/wm9705.c | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/wm9712.c | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/wm9713.c | 1 | ||||
-rw-r--r-- | drivers/input/touchscreen/wm97xx-core.c | 1 |
14 files changed, 73 insertions, 32 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index a92d81567559..3524bef62be6 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -677,8 +677,8 @@ static int handle_eviocgbit(struct input_dev *dev, unsigned int cmd, void __user | |||
677 | len = OLD_KEY_MAX; | 677 | len = OLD_KEY_MAX; |
678 | if (printk_timed_ratelimit(&keymax_warn_time, 10 * 1000)) | 678 | if (printk_timed_ratelimit(&keymax_warn_time, 10 * 1000)) |
679 | printk(KERN_WARNING | 679 | printk(KERN_WARNING |
680 | "evdev.c(EVIOCGBIT): Suspicious buffer size %d, " | 680 | "evdev.c(EVIOCGBIT): Suspicious buffer size %u, " |
681 | "limiting output to %d bytes. See " | 681 | "limiting output to %zu bytes. See " |
682 | "http://userweb.kernel.org/~dtor/eviocgbit-bug.html\n", | 682 | "http://userweb.kernel.org/~dtor/eviocgbit-bug.html\n", |
683 | OLD_KEY_MAX, | 683 | OLD_KEY_MAX, |
684 | BITS_TO_LONGS(OLD_KEY_MAX) * sizeof(long)); | 684 | BITS_TO_LONGS(OLD_KEY_MAX) * sizeof(long)); |
diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c index 54ed8e2e1c02..e348cfccc17a 100644 --- a/drivers/input/keyboard/bf54x-keys.c +++ b/drivers/input/keyboard/bf54x-keys.c | |||
@@ -29,7 +29,6 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/version.h> | ||
33 | 32 | ||
34 | #include <linux/init.h> | 33 | #include <linux/init.h> |
35 | #include <linux/fs.h> | 34 | #include <linux/fs.h> |
@@ -44,7 +43,7 @@ | |||
44 | #include <linux/input.h> | 43 | #include <linux/input.h> |
45 | 44 | ||
46 | #include <asm/portmux.h> | 45 | #include <asm/portmux.h> |
47 | #include <asm/mach/bf54x_keys.h> | 46 | #include <mach/bf54x_keys.h> |
48 | 47 | ||
49 | #define DRV_NAME "bf54x-keys" | 48 | #define DRV_NAME "bf54x-keys" |
50 | #define TIME_SCALE 100 /* 100 ns */ | 49 | #define TIME_SCALE 100 /* 100 ns */ |
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 3f48279f2195..ec96b369dd7a 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/version.h> | ||
13 | 12 | ||
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
diff --git a/drivers/input/misc/cobalt_btns.c b/drivers/input/misc/cobalt_btns.c index 6a1f48b76e32..2adf9cb265da 100644 --- a/drivers/input/misc/cobalt_btns.c +++ b/drivers/input/misc/cobalt_btns.c | |||
@@ -148,6 +148,9 @@ static int __devexit cobalt_buttons_remove(struct platform_device *pdev) | |||
148 | return 0; | 148 | return 0; |
149 | } | 149 | } |
150 | 150 | ||
151 | MODULE_AUTHOR("Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>"); | ||
152 | MODULE_DESCRIPTION("Cobalt button interface driver"); | ||
153 | MODULE_LICENSE("GPL"); | ||
151 | /* work with hotplug and coldplug */ | 154 | /* work with hotplug and coldplug */ |
152 | MODULE_ALIAS("platform:Cobalt buttons"); | 155 | MODULE_ALIAS("platform:Cobalt buttons"); |
153 | 156 | ||
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index 2ec921bf3c60..18f4d7f6ce6d 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c | |||
@@ -63,7 +63,7 @@ | |||
63 | } | 63 | } |
64 | 64 | ||
65 | /* table of devices that work with this driver */ | 65 | /* table of devices that work with this driver */ |
66 | static const struct usb_device_id bcm5974_table [] = { | 66 | static const struct usb_device_id bcm5974_table[] = { |
67 | /* MacbookAir1.1 */ | 67 | /* MacbookAir1.1 */ |
68 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING_ANSI), | 68 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING_ANSI), |
69 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING_ISO), | 69 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING_ISO), |
@@ -105,7 +105,7 @@ struct tp_header { | |||
105 | 105 | ||
106 | /* trackpad finger structure */ | 106 | /* trackpad finger structure */ |
107 | struct tp_finger { | 107 | struct tp_finger { |
108 | __le16 origin; /* left/right origin? */ | 108 | __le16 origin; /* zero when switching track finger */ |
109 | __le16 abs_x; /* absolute x coodinate */ | 109 | __le16 abs_x; /* absolute x coodinate */ |
110 | __le16 abs_y; /* absolute y coodinate */ | 110 | __le16 abs_y; /* absolute y coodinate */ |
111 | __le16 rel_x; /* relative x coodinate */ | 111 | __le16 rel_x; /* relative x coodinate */ |
@@ -159,6 +159,7 @@ struct bcm5974 { | |||
159 | struct bt_data *bt_data; /* button transferred data */ | 159 | struct bt_data *bt_data; /* button transferred data */ |
160 | struct urb *tp_urb; /* trackpad usb request block */ | 160 | struct urb *tp_urb; /* trackpad usb request block */ |
161 | struct tp_data *tp_data; /* trackpad transferred data */ | 161 | struct tp_data *tp_data; /* trackpad transferred data */ |
162 | int fingers; /* number of fingers on trackpad */ | ||
162 | }; | 163 | }; |
163 | 164 | ||
164 | /* logical dimensions */ | 165 | /* logical dimensions */ |
@@ -172,6 +173,10 @@ struct bcm5974 { | |||
172 | #define SN_WIDTH 100 /* width signal-to-noise ratio */ | 173 | #define SN_WIDTH 100 /* width signal-to-noise ratio */ |
173 | #define SN_COORD 250 /* coordinate signal-to-noise ratio */ | 174 | #define SN_COORD 250 /* coordinate signal-to-noise ratio */ |
174 | 175 | ||
176 | /* pressure thresholds */ | ||
177 | #define PRESSURE_LOW (2 * DIM_PRESSURE / SN_PRESSURE) | ||
178 | #define PRESSURE_HIGH (3 * PRESSURE_LOW) | ||
179 | |||
175 | /* device constants */ | 180 | /* device constants */ |
176 | static const struct bcm5974_config bcm5974_config_table[] = { | 181 | static const struct bcm5974_config bcm5974_config_table[] = { |
177 | { | 182 | { |
@@ -248,6 +253,7 @@ static void setup_events_to_report(struct input_dev *input_dev, | |||
248 | 0, cfg->y.dim, cfg->y.fuzz, 0); | 253 | 0, cfg->y.dim, cfg->y.fuzz, 0); |
249 | 254 | ||
250 | __set_bit(EV_KEY, input_dev->evbit); | 255 | __set_bit(EV_KEY, input_dev->evbit); |
256 | __set_bit(BTN_TOUCH, input_dev->keybit); | ||
251 | __set_bit(BTN_TOOL_FINGER, input_dev->keybit); | 257 | __set_bit(BTN_TOOL_FINGER, input_dev->keybit); |
252 | __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit); | 258 | __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit); |
253 | __set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit); | 259 | __set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit); |
@@ -273,32 +279,66 @@ static int report_tp_state(struct bcm5974 *dev, int size) | |||
273 | const struct tp_finger *f = dev->tp_data->finger; | 279 | const struct tp_finger *f = dev->tp_data->finger; |
274 | struct input_dev *input = dev->input; | 280 | struct input_dev *input = dev->input; |
275 | const int fingers = (size - 26) / 28; | 281 | const int fingers = (size - 26) / 28; |
276 | int p = 0, w, x, y, n = 0; | 282 | int raw_p, raw_w, raw_x, raw_y; |
283 | int ptest = 0, origin = 0, nmin = 0, nmax = 0; | ||
284 | int abs_p = 0, abs_w = 0, abs_x = 0, abs_y = 0; | ||
277 | 285 | ||
278 | if (size < 26 || (size - 26) % 28 != 0) | 286 | if (size < 26 || (size - 26) % 28 != 0) |
279 | return -EIO; | 287 | return -EIO; |
280 | 288 | ||
289 | /* always track the first finger; when detached, start over */ | ||
281 | if (fingers) { | 290 | if (fingers) { |
282 | p = raw2int(f->force_major); | 291 | raw_p = raw2int(f->force_major); |
283 | w = raw2int(f->size_major); | 292 | raw_w = raw2int(f->size_major); |
284 | x = raw2int(f->abs_x); | 293 | raw_x = raw2int(f->abs_x); |
285 | y = raw2int(f->abs_y); | 294 | raw_y = raw2int(f->abs_y); |
286 | n = p > 0 ? fingers : 0; | ||
287 | 295 | ||
288 | dprintk(9, | 296 | dprintk(9, |
289 | "bcm5974: p: %+05d w: %+05d x: %+05d y: %+05d n: %d\n", | 297 | "bcm5974: raw: p: %+05d w: %+05d x: %+05d y: %+05d\n", |
290 | p, w, x, y, n); | 298 | raw_p, raw_w, raw_x, raw_y); |
299 | |||
300 | ptest = int2bound(&c->p, raw_p); | ||
301 | origin = raw2int(f->origin); | ||
302 | } | ||
291 | 303 | ||
292 | input_report_abs(input, ABS_TOOL_WIDTH, int2bound(&c->w, w)); | 304 | /* while tracking finger still valid, count all fingers */ |
293 | input_report_abs(input, ABS_X, int2bound(&c->x, x - c->x.devmin)); | 305 | if (ptest > PRESSURE_LOW && origin) { |
294 | input_report_abs(input, ABS_Y, int2bound(&c->y, c->y.devmax - y)); | 306 | abs_p = ptest; |
307 | abs_w = int2bound(&c->w, raw_w); | ||
308 | abs_x = int2bound(&c->x, raw_x - c->x.devmin); | ||
309 | abs_y = int2bound(&c->y, c->y.devmax - raw_y); | ||
310 | for (; f != dev->tp_data->finger + fingers; f++) { | ||
311 | ptest = int2bound(&c->p, raw2int(f->force_major)); | ||
312 | if (ptest > PRESSURE_LOW) | ||
313 | nmax++; | ||
314 | if (ptest > PRESSURE_HIGH) | ||
315 | nmin++; | ||
316 | } | ||
295 | } | 317 | } |
296 | 318 | ||
297 | input_report_abs(input, ABS_PRESSURE, int2bound(&c->p, p)); | 319 | if (dev->fingers < nmin) |
320 | dev->fingers = nmin; | ||
321 | if (dev->fingers > nmax) | ||
322 | dev->fingers = nmax; | ||
323 | |||
324 | input_report_key(input, BTN_TOUCH, dev->fingers > 0); | ||
325 | input_report_key(input, BTN_TOOL_FINGER, dev->fingers == 1); | ||
326 | input_report_key(input, BTN_TOOL_DOUBLETAP, dev->fingers == 2); | ||
327 | input_report_key(input, BTN_TOOL_TRIPLETAP, dev->fingers > 2); | ||
298 | 328 | ||
299 | input_report_key(input, BTN_TOOL_FINGER, n == 1); | 329 | input_report_abs(input, ABS_PRESSURE, abs_p); |
300 | input_report_key(input, BTN_TOOL_DOUBLETAP, n == 2); | 330 | input_report_abs(input, ABS_TOOL_WIDTH, abs_w); |
301 | input_report_key(input, BTN_TOOL_TRIPLETAP, n > 2); | 331 | |
332 | if (abs_p) { | ||
333 | input_report_abs(input, ABS_X, abs_x); | ||
334 | input_report_abs(input, ABS_Y, abs_y); | ||
335 | |||
336 | dprintk(8, | ||
337 | "bcm5974: abs: p: %+05d w: %+05d x: %+05d y: %+05d " | ||
338 | "nmin: %d nmax: %d n: %d\n", | ||
339 | abs_p, abs_w, abs_x, abs_y, nmin, nmax, dev->fingers); | ||
340 | |||
341 | } | ||
302 | 342 | ||
303 | input_sync(input); | 343 | input_sync(input); |
304 | 344 | ||
diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c index 339290184871..72cf5e33790e 100644 --- a/drivers/input/mouse/gpio_mouse.c +++ b/drivers/input/mouse/gpio_mouse.c | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/version.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
15 | #include <linux/input-polldev.h> | 14 | #include <linux/input-polldev.h> |
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 3282b741e246..5aafe24984c5 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -305,7 +305,7 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
305 | .ident = "Lenovo 3000 n100", | 305 | .ident = "Lenovo 3000 n100", |
306 | .matches = { | 306 | .matches = { |
307 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | 307 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
308 | DMI_MATCH(DMI_PRODUCT_VERSION, "3000 N100"), | 308 | DMI_MATCH(DMI_PRODUCT_NAME, "076804U"), |
309 | }, | 309 | }, |
310 | }, | 310 | }, |
311 | { | 311 | { |
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index b9b7a98bc5a5..7df0228e836e 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c | |||
@@ -64,7 +64,6 @@ Scott Hill shill@gtcocalcomp.com | |||
64 | #include <asm/byteorder.h> | 64 | #include <asm/byteorder.h> |
65 | 65 | ||
66 | 66 | ||
67 | #include <linux/version.h> | ||
68 | #include <linux/usb/input.h> | 67 | #include <linux/usb/input.h> |
69 | 68 | ||
70 | /* Version with a Major number of 2 is for kernel inclusion only. */ | 69 | /* Version with a Major number of 2 is for kernel inclusion only. */ |
diff --git a/drivers/input/touchscreen/mainstone-wm97xx.c b/drivers/input/touchscreen/mainstone-wm97xx.c index 283f93a0cee2..37a555f37306 100644 --- a/drivers/input/touchscreen/mainstone-wm97xx.c +++ b/drivers/input/touchscreen/mainstone-wm97xx.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
28 | #include <linux/version.h> | ||
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
30 | #include <linux/init.h> | 29 | #include <linux/init.h> |
31 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
diff --git a/drivers/input/touchscreen/migor_ts.c b/drivers/input/touchscreen/migor_ts.c index c1cd99d58981..504ca11749a1 100644 --- a/drivers/input/touchscreen/migor_ts.c +++ b/drivers/input/touchscreen/migor_ts.c | |||
@@ -173,7 +173,7 @@ static int migor_ts_probe(struct i2c_client *client, | |||
173 | input_set_abs_params(input, ABS_X, 95, 955, 0, 0); | 173 | input_set_abs_params(input, ABS_X, 95, 955, 0, 0); |
174 | input_set_abs_params(input, ABS_Y, 85, 935, 0, 0); | 174 | input_set_abs_params(input, ABS_Y, 85, 935, 0, 0); |
175 | 175 | ||
176 | input->name = client->driver_name; | 176 | input->name = client->name; |
177 | input->id.bustype = BUS_I2C; | 177 | input->id.bustype = BUS_I2C; |
178 | input->dev.parent = &client->dev; | 178 | input->dev.parent = &client->dev; |
179 | 179 | ||
@@ -192,7 +192,7 @@ static int migor_ts_probe(struct i2c_client *client, | |||
192 | goto err1; | 192 | goto err1; |
193 | 193 | ||
194 | error = request_irq(priv->irq, migor_ts_isr, IRQF_TRIGGER_LOW, | 194 | error = request_irq(priv->irq, migor_ts_isr, IRQF_TRIGGER_LOW, |
195 | client->driver_name, priv); | 195 | client->name, priv); |
196 | if (error) { | 196 | if (error) { |
197 | dev_err(&client->dev, "Unable to request touchscreen IRQ.\n"); | 197 | dev_err(&client->dev, "Unable to request touchscreen IRQ.\n"); |
198 | goto err2; | 198 | goto err2; |
@@ -224,12 +224,19 @@ static int migor_ts_remove(struct i2c_client *client) | |||
224 | return 0; | 224 | return 0; |
225 | } | 225 | } |
226 | 226 | ||
227 | static const struct i2c_device_id migor_ts_id[] = { | ||
228 | { "migor_ts", 0 }, | ||
229 | { } | ||
230 | }; | ||
231 | MODULE_DEVICE_TABLE(i2c, migor_ts); | ||
232 | |||
227 | static struct i2c_driver migor_ts_driver = { | 233 | static struct i2c_driver migor_ts_driver = { |
228 | .driver = { | 234 | .driver = { |
229 | .name = "migor_ts", | 235 | .name = "migor_ts", |
230 | }, | 236 | }, |
231 | .probe = migor_ts_probe, | 237 | .probe = migor_ts_probe, |
232 | .remove = migor_ts_remove, | 238 | .remove = migor_ts_remove, |
239 | .id_table = migor_ts_id, | ||
233 | }; | 240 | }; |
234 | 241 | ||
235 | static int __init migor_ts_init(void) | 242 | static int __init migor_ts_init(void) |
diff --git a/drivers/input/touchscreen/wm9705.c b/drivers/input/touchscreen/wm9705.c index 978e1a13ffc7..372efbc694ff 100644 --- a/drivers/input/touchscreen/wm9705.c +++ b/drivers/input/touchscreen/wm9705.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/moduleparam.h> | 19 | #include <linux/moduleparam.h> |
20 | #include <linux/version.h> | ||
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/input.h> | 21 | #include <linux/input.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/input/touchscreen/wm9712.c b/drivers/input/touchscreen/wm9712.c index 4c5d85a249ae..c8bb1e7335fc 100644 --- a/drivers/input/touchscreen/wm9712.c +++ b/drivers/input/touchscreen/wm9712.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/moduleparam.h> | 19 | #include <linux/moduleparam.h> |
20 | #include <linux/version.h> | ||
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/input.h> | 21 | #include <linux/input.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c index 838458792ea0..781ee83547e6 100644 --- a/drivers/input/touchscreen/wm9713.c +++ b/drivers/input/touchscreen/wm9713.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/moduleparam.h> | 19 | #include <linux/moduleparam.h> |
20 | #include <linux/version.h> | ||
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/input.h> | 21 | #include <linux/input.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index cdc24ad314e0..d589ab0e3adc 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c | |||
@@ -37,7 +37,6 @@ | |||
37 | 37 | ||
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/moduleparam.h> | 39 | #include <linux/moduleparam.h> |
40 | #include <linux/version.h> | ||
41 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
42 | #include <linux/init.h> | 41 | #include <linux/init.h> |
43 | #include <linux/delay.h> | 42 | #include <linux/delay.h> |