aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-02-03 02:29:41 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2008-02-03 02:30:32 -0500
commitc1f3ee120bb61045b1c0a3ead620d1d65af47130 (patch)
tree908430bf2b47fe8e96ac623ae7ab6dd5698d0938 /drivers/input
parente619a75ff6201b567a539e787aa9af9bc63a3187 (diff)
parent9135f1901ee6449dfe338adf6e40e9c2025b8150 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/gameport/gameport.c2
-rw-r--r--drivers/input/input.c8
-rw-r--r--drivers/input/joystick/xpad.c2
-rw-r--r--drivers/input/keyboard/Kconfig14
-rw-r--r--drivers/input/keyboard/gpio_keys.c38
-rw-r--r--drivers/input/keyboard/jornada680_kbd.c40
-rw-r--r--drivers/input/keyboard/spitzkbd.c1
-rw-r--r--drivers/input/misc/pcspkr.c2
-rw-r--r--drivers/input/misc/sparcspkr.c4
-rw-r--r--drivers/input/mouse/alps.c2
-rw-r--r--drivers/input/mouse/appletouch.c125
-rw-r--r--drivers/input/mouse/inport.c2
-rw-r--r--drivers/input/mouse/lifebook.c7
-rw-r--r--drivers/input/mouse/logibm.c2
-rw-r--r--drivers/input/mouse/pc110pad.c7
-rw-r--r--drivers/input/mouse/psmouse-base.c2
-rw-r--r--drivers/input/mousedev.c9
-rw-r--r--drivers/input/serio/Kconfig2
-rw-r--r--drivers/input/serio/hp_sdc.c4
-rw-r--r--drivers/input/serio/i8042-x86ia64io.h8
-rw-r--r--drivers/input/touchscreen/Kconfig8
-rw-r--r--drivers/input/touchscreen/ads7846.c13
-rw-r--r--drivers/input/touchscreen/corgi_ts.c8
-rw-r--r--drivers/input/touchscreen/ucb1400_ts.c1
-rw-r--r--drivers/input/touchscreen/usbtouchscreen.c55
25 files changed, 226 insertions, 140 deletions
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
index bfc6061f1554..1dc2ac9f3d1c 100644
--- a/drivers/input/gameport/gameport.c
+++ b/drivers/input/gameport/gameport.c
@@ -38,8 +38,6 @@ EXPORT_SYMBOL(gameport_unregister_driver);
38EXPORT_SYMBOL(gameport_open); 38EXPORT_SYMBOL(gameport_open);
39EXPORT_SYMBOL(gameport_close); 39EXPORT_SYMBOL(gameport_close);
40EXPORT_SYMBOL(gameport_rescan); 40EXPORT_SYMBOL(gameport_rescan);
41EXPORT_SYMBOL(gameport_cooked_read);
42EXPORT_SYMBOL(gameport_set_name);
43EXPORT_SYMBOL(gameport_set_phys); 41EXPORT_SYMBOL(gameport_set_phys);
44EXPORT_SYMBOL(gameport_start_polling); 42EXPORT_SYMBOL(gameport_start_polling);
45EXPORT_SYMBOL(gameport_stop_polling); 43EXPORT_SYMBOL(gameport_stop_polling);
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 307c7b5c2b33..a0be978501ff 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -235,6 +235,10 @@ static void input_handle_event(struct input_dev *dev,
235 if (value >= 0) 235 if (value >= 0)
236 disposition = INPUT_PASS_TO_ALL; 236 disposition = INPUT_PASS_TO_ALL;
237 break; 237 break;
238
239 case EV_PWR:
240 disposition = INPUT_PASS_TO_ALL;
241 break;
238 } 242 }
239 243
240 if (type != EV_SYN) 244 if (type != EV_SYN)
@@ -1266,6 +1270,10 @@ void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int
1266 __set_bit(code, dev->ffbit); 1270 __set_bit(code, dev->ffbit);
1267 break; 1271 break;
1268 1272
1273 case EV_PWR:
1274 /* do nothing */
1275 break;
1276
1269 default: 1277 default:
1270 printk(KERN_ERR 1278 printk(KERN_ERR
1271 "input_set_capability: unknown type %u (code %u)\n", 1279 "input_set_capability: unknown type %u (code %u)\n",
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 6dd375825a14..6e9d75bd2b15 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -120,6 +120,7 @@ static const struct xpad_device {
120 { 0x0738, 0x4536, "Mad Catz MicroCON", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 120 { 0x0738, 0x4536, "Mad Catz MicroCON", MAP_DPAD_TO_AXES, XTYPE_XBOX },
121 { 0x0738, 0x4540, "Mad Catz Beat Pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, 121 { 0x0738, 0x4540, "Mad Catz Beat Pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
122 { 0x0738, 0x4556, "Mad Catz Lynx Wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 122 { 0x0738, 0x4556, "Mad Catz Lynx Wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
123 { 0x0738, 0x4716, "Mad Catz Wired Xbox 360 Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX360 },
123 { 0x0738, 0x6040, "Mad Catz Beat Pad Pro", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, 124 { 0x0738, 0x6040, "Mad Catz Beat Pad Pro", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
124 { 0x0c12, 0x8802, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 125 { 0x0c12, 0x8802, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
125 { 0x0c12, 0x8810, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 126 { 0x0c12, 0x8810, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
@@ -129,6 +130,7 @@ static const struct xpad_device {
129 { 0x0e6f, 0x0003, "Logic3 Freebird wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 130 { 0x0e6f, 0x0003, "Logic3 Freebird wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
130 { 0x0e6f, 0x0005, "Eclipse wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 131 { 0x0e6f, 0x0005, "Eclipse wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
131 { 0x0e6f, 0x0006, "Edge wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 132 { 0x0e6f, 0x0006, "Edge wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
133 { 0x0e6f, 0x0006, "Pelican 'TSZ' Wired Xbox 360 Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX360 },
132 { 0x0e8f, 0x0201, "SmartJoy Frag Xpad/PS2 adaptor", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 134 { 0x0e8f, 0x0201, "SmartJoy Frag Xpad/PS2 adaptor", MAP_DPAD_TO_AXES, XTYPE_XBOX },
133 { 0x0f30, 0x0202, "Joytech Advanced Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 135 { 0x0f30, 0x0202, "Joytech Advanced Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
134 { 0x0f30, 0x8888, "BigBen XBMiniPad Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX }, 136 { 0x0f30, 0x8888, "BigBen XBMiniPad Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index 2316a018fae6..086d58c0ccbe 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -209,22 +209,22 @@ config KEYBOARD_HIL
209 to your machine, so normally you should say Y here. 209 to your machine, so normally you should say Y here.
210 210
211config KEYBOARD_HP6XX 211config KEYBOARD_HP6XX
212 tristate "HP Jornada 6XX Keyboard support" 212 tristate "HP Jornada 6xx keyboard"
213 depends on SH_HP6XX 213 depends on SH_HP6XX
214 select INPUT_POLLDEV 214 select INPUT_POLLDEV
215 help 215 help
216 This adds support for the onboard keyboard found on 216 Say Y here if you have a HP Jornada 620/660/680/690 and want to
217 HP Jornada 620/660/680/690. 217 support the built-in keyboard.
218 218
219 To compile this driver as a module, choose M here: the 219 To compile this driver as a module, choose M here: the
220 module will be called jornada680_kbd. 220 module will be called jornada680_kbd.
221 221
222config KEYBOARD_HP7XX 222config KEYBOARD_HP7XX
223 tristate "HP Jornada 7XX Keyboard Driver" 223 tristate "HP Jornada 7xx keyboard"
224 depends on SA1100_JORNADA720_SSP && SA1100_SSP 224 depends on SA1100_JORNADA720_SSP && SA1100_SSP
225 help 225 help
226 Say Y here to add support for the HP Jornada 7xx (710/720/728) 226 Say Y here if you have a HP Jornada 710/720/728 and want to
227 onboard keyboard. 227 support the built-in keyboard.
228 228
229 To compile this driver as a module, choose M here: the 229 To compile this driver as a module, choose M here: the
230 module will be called jornada720_kbd. 230 module will be called jornada720_kbd.
@@ -286,7 +286,7 @@ config KEYBOARD_MAPLE
286 286
287config KEYBOARD_BFIN 287config KEYBOARD_BFIN
288 tristate "Blackfin BF54x keypad support" 288 tristate "Blackfin BF54x keypad support"
289 depends on BF54x 289 depends on (BF54x && !BF544)
290 help 290 help
291 Say Y here if you want to use the BF54x keypad. 291 Say Y here if you want to use the BF54x keypad.
292 292
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 3eddf52a0bba..6a9ca4bdcb74 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -75,16 +75,32 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
75 75
76 for (i = 0; i < pdata->nbuttons; i++) { 76 for (i = 0; i < pdata->nbuttons; i++) {
77 struct gpio_keys_button *button = &pdata->buttons[i]; 77 struct gpio_keys_button *button = &pdata->buttons[i];
78 int irq = gpio_to_irq(button->gpio); 78 int irq;
79 unsigned int type = button->type ?: EV_KEY; 79 unsigned int type = button->type ?: EV_KEY;
80 80
81 error = gpio_request(button->gpio, button->desc ?: "gpio_keys");
82 if (error < 0) {
83 pr_err("gpio-keys: failed to request GPIO %d,"
84 " error %d\n", button->gpio, error);
85 goto fail;
86 }
87
88 error = gpio_direction_input(button->gpio);
89 if (error < 0) {
90 pr_err("gpio-keys: failed to configure input"
91 " direction for GPIO %d, error %d\n",
92 button->gpio, error);
93 gpio_free(button->gpio);
94 goto fail;
95 }
96
97 irq = gpio_to_irq(button->gpio);
81 if (irq < 0) { 98 if (irq < 0) {
82 error = irq; 99 error = irq;
83 printk(KERN_ERR 100 pr_err("gpio-keys: Unable to get irq number"
84 "gpio-keys: " 101 " for GPIO %d, error %d\n",
85 "Unable to get irq number for GPIO %d,"
86 "error %d\n",
87 button->gpio, error); 102 button->gpio, error);
103 gpio_free(button->gpio);
88 goto fail; 104 goto fail;
89 } 105 }
90 106
@@ -94,9 +110,9 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
94 button->desc ? button->desc : "gpio_keys", 110 button->desc ? button->desc : "gpio_keys",
95 pdev); 111 pdev);
96 if (error) { 112 if (error) {
97 printk(KERN_ERR 113 pr_err("gpio-keys: Unable to claim irq %d; error %d\n",
98 "gpio-keys: Unable to claim irq %d; error %d\n",
99 irq, error); 114 irq, error);
115 gpio_free(button->gpio);
100 goto fail; 116 goto fail;
101 } 117 }
102 118
@@ -108,8 +124,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
108 124
109 error = input_register_device(input); 125 error = input_register_device(input);
110 if (error) { 126 if (error) {
111 printk(KERN_ERR 127 pr_err("gpio-keys: Unable to register input device, "
112 "gpio-keys: Unable to register input device, "
113 "error: %d\n", error); 128 "error: %d\n", error);
114 goto fail; 129 goto fail;
115 } 130 }
@@ -119,8 +134,10 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
119 return 0; 134 return 0;
120 135
121 fail: 136 fail:
122 while (--i >= 0) 137 while (--i >= 0) {
123 free_irq(gpio_to_irq(pdata->buttons[i].gpio), pdev); 138 free_irq(gpio_to_irq(pdata->buttons[i].gpio), pdev);
139 gpio_free(pdata->buttons[i].gpio);
140 }
124 141
125 platform_set_drvdata(pdev, NULL); 142 platform_set_drvdata(pdev, NULL);
126 input_free_device(input); 143 input_free_device(input);
@@ -139,6 +156,7 @@ static int __devexit gpio_keys_remove(struct platform_device *pdev)
139 for (i = 0; i < pdata->nbuttons; i++) { 156 for (i = 0; i < pdata->nbuttons; i++) {
140 int irq = gpio_to_irq(pdata->buttons[i].gpio); 157 int irq = gpio_to_irq(pdata->buttons[i].gpio);
141 free_irq(irq, pdev); 158 free_irq(irq, pdev);
159 gpio_free(pdata->buttons[i].gpio);
142 } 160 }
143 161
144 input_unregister_device(input); 162 input_unregister_device(input);
diff --git a/drivers/input/keyboard/jornada680_kbd.c b/drivers/input/keyboard/jornada680_kbd.c
index bec1cf483723..a23633a2e1b4 100644
--- a/drivers/input/keyboard/jornada680_kbd.c
+++ b/drivers/input/keyboard/jornada680_kbd.c
@@ -16,14 +16,14 @@
16 * published by the Free Software Foundation. 16 * published by the Free Software Foundation.
17 */ 17 */
18 18
19#include <linux/input.h>
20#include <linux/kernel.h>
21#include <linux/module.h>
22#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/input.h>
23#include <linux/input-polldev.h> 21#include <linux/input-polldev.h>
22#include <linux/interrupt.h>
24#include <linux/jiffies.h> 23#include <linux/jiffies.h>
24#include <linux/kernel.h>
25#include <linux/module.h>
25#include <linux/platform_device.h> 26#include <linux/platform_device.h>
26#include <linux/interrupt.h>
27 27
28#include <asm/delay.h> 28#include <asm/delay.h>
29#include <asm/io.h> 29#include <asm/io.h>
@@ -43,22 +43,22 @@
43#define PLDR 0xa4000134 43#define PLDR 0xa4000134
44 44
45static const unsigned short jornada_scancodes[] = { 45static const unsigned short jornada_scancodes[] = {
46/* PTD1 */ KEY_CAPSLOCK, KEY_MACRO, KEY_LEFTCTRL, 0, KEY_ESC, 0, 0, 0, /* 1 -> 8 */ 46/* PTD1 */ KEY_CAPSLOCK, KEY_MACRO, KEY_LEFTCTRL, 0, KEY_ESC, KEY_KP5, 0, 0, /* 1 -> 8 */
47 KEY_F1, KEY_F2, KEY_F3, KEY_F8, KEY_F7, KEY_F2, KEY_F4, KEY_F5, /* 9 -> 16 */ 47 KEY_F1, KEY_F2, KEY_F3, KEY_F8, KEY_F7, KEY_F6, KEY_F4, KEY_F5, /* 9 -> 16 */
48/* PTD5 */ KEY_SLASH, KEY_APOSTROPHE, KEY_ENTER, 0, KEY_Z, 0, 0, 0, /* 17 -> 24 */ 48/* PTD5 */ KEY_SLASH, KEY_APOSTROPHE, KEY_ENTER, 0, KEY_Z, 0, 0, 0, /* 17 -> 24 */
49 KEY_X, KEY_C, KEY_V, KEY_DOT, KEY_COMMA, KEY_M, KEY_B, KEY_N, /* 25 -> 32 */ 49 KEY_X, KEY_C, KEY_V, KEY_DOT, KEY_COMMA, KEY_M, KEY_B, KEY_N, /* 25 -> 32 */
50/* PTD7 */ KEY_KP2, KEY_KP6, 0, 0, 0, 0, 0, 0, /* 33 -> 40 */ 50/* PTD7 */ KEY_KP2, KEY_KP6, KEY_KP3, 0, 0, 0, 0, 0, /* 33 -> 40 */
51 0, 0, 0, KEY_KP4, 0, 0, KEY_LEFTALT, KEY_HANJA, /* 41 -> 48 */ 51 KEY_F10, KEY_RO, KEY_F9, KEY_KP4, KEY_NUMLOCK, KEY_SCROLLLOCK, KEY_LEFTALT, KEY_HANJA, /* 41 -> 48 */
52/* PTE0 */ 0, 0, 0, 0, KEY_FINANCE, 0, 0, 0, /* 49 -> 56 */ 52/* PTE0 */ KEY_KATAKANA, KEY_KP0, KEY_GRAVE, 0, KEY_FINANCE, 0, 0, 0, /* 49 -> 56 */
53 KEY_LEFTCTRL, 0, KEY_SPACE, KEY_KPDOT, KEY_VOLUMEUP, 249, 0, 0, /* 57 -> 64 */ 53 KEY_KPMINUS, KEY_HIRAGANA, KEY_SPACE, KEY_KPDOT, KEY_VOLUMEUP, 249, 0, 0, /* 57 -> 64 */
54/* PTE1 */ KEY_SEMICOLON, KEY_RIGHTBRACE, KEY_BACKSLASH, 0, KEY_A, 0, 0, 0,/* 65 -> 72 */ 54/* PTE1 */ KEY_SEMICOLON, KEY_RIGHTBRACE, KEY_BACKSLASH, 0, KEY_A, 0, 0, 0, /* 65 -> 72 */
55 KEY_S, KEY_D, KEY_F, KEY_L, KEY_K, KEY_J, KEY_G, KEY_H, /* 73 -> 80 */ 55 KEY_S, KEY_D, KEY_F, KEY_L, KEY_K, KEY_J, KEY_G, KEY_H, /* 73 -> 80 */
56/* PTE3 */ KEY_KP8, KEY_LEFTMETA, KEY_RIGHTSHIFT, 0, KEY_TAB, 0, 0,0, /* 81 -> 88 */ 56/* PTE3 */ KEY_KP8, KEY_LEFTMETA, KEY_RIGHTSHIFT, 0, KEY_TAB, 0, 0, 0, /* 81 -> 88 */
57 0, KEY_LEFTSHIFT, 0, 0, 0, 0, 0, 0, /* 89 -> 96 */ 57 0, KEY_LEFTSHIFT, KEY_KP7, KEY_KP9, KEY_KP1, KEY_F11, KEY_KPPLUS, KEY_KPASTERISK, /* 89 -> 96 */
58/* PTE6 */ KEY_P, KEY_LEFTBRACE, KEY_BACKSPACE, 0, KEY_Q, 0, 0, 0, /* 97 -> 104 */ 58/* PTE6 */ KEY_P, KEY_LEFTBRACE, KEY_BACKSPACE, 0, KEY_Q, 0, 0, 0, /* 97 -> 104 */
59 KEY_W, KEY_E, KEY_R, KEY_O, KEY_I, KEY_U, KEY_T, KEY_R, /* 105 -> 112 */ 59 KEY_W, KEY_E, KEY_R, KEY_O, KEY_I, KEY_U, KEY_T, KEY_Y, /* 105 -> 112 */
60/* PTE7 */ KEY_0, KEY_MINUS, KEY_EQUAL, 0, KEY_1, 0, 0, 0, /* 113 -> 120 */ 60/* PTE7 */ KEY_0, KEY_MINUS, KEY_EQUAL, 0, KEY_1, 0, 0, 0, /* 113 -> 120 */
61 KEY_2, KEY_3, KEY_4, KEY_9, KEY_8, KEY_7, KEY_5, KEY_6, /* 121 -> 128 */ 61 KEY_2, KEY_3, KEY_4, KEY_9, KEY_8, KEY_7, KEY_5, KEY_6, /* 121 -> 128 */
62/* **** */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62/* **** */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
63 0, 0, 0, 0, 0 63 0, 0, 0, 0, 0
64}; 64};
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c
index 410d78a774d0..1d59a2dc3c17 100644
--- a/drivers/input/keyboard/spitzkbd.c
+++ b/drivers/input/keyboard/spitzkbd.c
@@ -391,6 +391,7 @@ static int __init spitzkbd_probe(struct platform_device *dev)
391 for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++) 391 for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++)
392 set_bit(spitzkbd->keycode[i], input_dev->keybit); 392 set_bit(spitzkbd->keycode[i], input_dev->keybit);
393 clear_bit(0, input_dev->keybit); 393 clear_bit(0, input_dev->keybit);
394 set_bit(KEY_SUSPEND, input_dev->keybit);
394 set_bit(SW_LID, input_dev->swbit); 395 set_bit(SW_LID, input_dev->swbit);
395 set_bit(SW_TABLET_MODE, input_dev->swbit); 396 set_bit(SW_TABLET_MODE, input_dev->swbit);
396 set_bit(SW_HEADPHONE_INSERT, input_dev->swbit); 397 set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);
diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c
index 4941a9e61e90..43aaa5cebd12 100644
--- a/drivers/input/misc/pcspkr.c
+++ b/drivers/input/misc/pcspkr.c
@@ -24,7 +24,7 @@ MODULE_DESCRIPTION("PC Speaker beeper driver");
24MODULE_LICENSE("GPL"); 24MODULE_LICENSE("GPL");
25MODULE_ALIAS("platform:pcspkr"); 25MODULE_ALIAS("platform:pcspkr");
26 26
27#ifdef CONFIG_X86 27#if defined(CONFIG_MIPS) || defined(CONFIG_X86)
28/* Use the global PIT lock ! */ 28/* Use the global PIT lock ! */
29#include <asm/i8253.h> 29#include <asm/i8253.h>
30#else 30#else
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c
index a3637d870880..fed3c375ccf3 100644
--- a/drivers/input/misc/sparcspkr.c
+++ b/drivers/input/misc/sparcspkr.c
@@ -195,7 +195,7 @@ static struct of_platform_driver ebus_beep_driver = {
195 .name = "beep", 195 .name = "beep",
196 .match_table = ebus_beep_match, 196 .match_table = ebus_beep_match,
197 .probe = ebus_beep_probe, 197 .probe = ebus_beep_probe,
198 .remove = sparcspkr_remove, 198 .remove = __devexit_p(sparcspkr_remove),
199 .shutdown = sparcspkr_shutdown, 199 .shutdown = sparcspkr_shutdown,
200}; 200};
201 201
@@ -236,7 +236,7 @@ static struct of_platform_driver isa_beep_driver = {
236 .name = "beep", 236 .name = "beep",
237 .match_table = isa_beep_match, 237 .match_table = isa_beep_match,
238 .probe = isa_beep_probe, 238 .probe = isa_beep_probe,
239 .remove = sparcspkr_remove, 239 .remove = __devexit_p(sparcspkr_remove),
240 .shutdown = sparcspkr_shutdown, 240 .shutdown = sparcspkr_shutdown,
241}; 241};
242 242
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 2b5ed119c9a9..b346a3b418ea 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -54,7 +54,7 @@ static const struct alps_model_info alps_model_data[] = {
54 { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */ 54 { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
55 { { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, 55 { { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
56 { { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */ 56 { { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
57 { { 0x73, 0x02, 0x50 }, 0xcf, 0xff, ALPS_FW_BK_1 } /* Dell Vostro 1400 */ 57 { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FW_BK_1 } /* Dell Vostro 1400 */
58}; 58};
59 59
60/* 60/*
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index f132702d137d..b4423a471f02 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -129,12 +129,12 @@ MODULE_DEVICE_TABLE (usb, atp_table);
129 */ 129 */
130#define ATP_THRESHOLD 5 130#define ATP_THRESHOLD 5
131 131
132/* MacBook Pro (Geyser 3 & 4) initialization constants */ 132/* Geyser initialization constants */
133#define ATP_GEYSER3_MODE_READ_REQUEST_ID 1 133#define ATP_GEYSER_MODE_READ_REQUEST_ID 1
134#define ATP_GEYSER3_MODE_WRITE_REQUEST_ID 9 134#define ATP_GEYSER_MODE_WRITE_REQUEST_ID 9
135#define ATP_GEYSER3_MODE_REQUEST_VALUE 0x300 135#define ATP_GEYSER_MODE_REQUEST_VALUE 0x300
136#define ATP_GEYSER3_MODE_REQUEST_INDEX 0 136#define ATP_GEYSER_MODE_REQUEST_INDEX 0
137#define ATP_GEYSER3_MODE_VENDOR_VALUE 0x04 137#define ATP_GEYSER_MODE_VENDOR_VALUE 0x04
138 138
139/* Structure to hold all of our device specific stuff */ 139/* Structure to hold all of our device specific stuff */
140struct atp { 140struct atp {
@@ -142,9 +142,11 @@ struct atp {
142 struct usb_device * udev; /* usb device */ 142 struct usb_device * udev; /* usb device */
143 struct urb * urb; /* usb request block */ 143 struct urb * urb; /* usb request block */
144 signed char * data; /* transferred data */ 144 signed char * data; /* transferred data */
145 int open; /* non-zero if opened */ 145 struct input_dev * input; /* input dev */
146 struct input_dev *input; /* input dev */ 146 unsigned char open; /* non-zero if opened */
147 int valid; /* are the sensors valid ? */ 147 unsigned char valid; /* are the sensors valid ? */
148 unsigned char size_detect_done;
149 unsigned char overflowwarn; /* overflow warning printed? */
148 int x_old; /* last reported x/y, */ 150 int x_old; /* last reported x/y, */
149 int y_old; /* used for smoothing */ 151 int y_old; /* used for smoothing */
150 /* current value of the sensors */ 152 /* current value of the sensors */
@@ -153,7 +155,6 @@ struct atp {
153 signed char xy_old[ATP_XSENSORS + ATP_YSENSORS]; 155 signed char xy_old[ATP_XSENSORS + ATP_YSENSORS];
154 /* accumulated sensors */ 156 /* accumulated sensors */
155 int xy_acc[ATP_XSENSORS + ATP_YSENSORS]; 157 int xy_acc[ATP_XSENSORS + ATP_YSENSORS];
156 int overflowwarn; /* overflow warning printed? */
157 int datalen; /* size of an USB urb transfer */ 158 int datalen; /* size of an USB urb transfer */
158 int idlecount; /* number of empty packets */ 159 int idlecount; /* number of empty packets */
159 struct work_struct work; 160 struct work_struct work;
@@ -170,7 +171,7 @@ struct atp {
170 171
171#define dprintk(format, a...) \ 172#define dprintk(format, a...) \
172 do { \ 173 do { \
173 if (debug) printk(format, ##a); \ 174 if (debug) printk(KERN_DEBUG format, ##a); \
174 } while (0) 175 } while (0)
175 176
176MODULE_AUTHOR("Johannes Berg, Stelian Pop, Frank Arnold, Michael Hanselmann"); 177MODULE_AUTHOR("Johannes Berg, Stelian Pop, Frank Arnold, Michael Hanselmann");
@@ -188,6 +189,15 @@ static int debug = 1;
188module_param(debug, int, 0644); 189module_param(debug, int, 0644);
189MODULE_PARM_DESC(debug, "Activate debugging output"); 190MODULE_PARM_DESC(debug, "Activate debugging output");
190 191
192static inline int atp_is_fountain(struct atp *dev)
193{
194 u16 productId = le16_to_cpu(dev->udev->descriptor.idProduct);
195
196 return productId == FOUNTAIN_ANSI_PRODUCT_ID ||
197 productId == FOUNTAIN_ISO_PRODUCT_ID ||
198 productId == FOUNTAIN_TP_ONLY_PRODUCT_ID;
199}
200
191/* Checks if the device a Geyser 2 (ANSI, ISO, JIS) */ 201/* Checks if the device a Geyser 2 (ANSI, ISO, JIS) */
192static inline int atp_is_geyser_2(struct atp *dev) 202static inline int atp_is_geyser_2(struct atp *dev)
193{ 203{
@@ -211,52 +221,63 @@ static inline int atp_is_geyser_3(struct atp *dev)
211} 221}
212 222
213/* 223/*
214 * By default Geyser 3 device sends standard USB HID mouse 224 * By default newer Geyser devices send standard USB HID mouse
215 * packets (Report ID 2). This code changes device mode, so it 225 * packets (Report ID 2). This code changes device mode, so it
216 * sends raw sensor reports (Report ID 5). 226 * sends raw sensor reports (Report ID 5).
217 */ 227 */
218static int atp_geyser3_init(struct usb_device *udev) 228static int atp_geyser_init(struct usb_device *udev)
219{ 229{
220 char data[8]; 230 char data[8];
221 int size; 231 int size;
222 232
223 size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), 233 size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
224 ATP_GEYSER3_MODE_READ_REQUEST_ID, 234 ATP_GEYSER_MODE_READ_REQUEST_ID,
225 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 235 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
226 ATP_GEYSER3_MODE_REQUEST_VALUE, 236 ATP_GEYSER_MODE_REQUEST_VALUE,
227 ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000); 237 ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000);
228 238
229 if (size != 8) { 239 if (size != 8) {
230 err("Could not do mode read request from device" 240 err("Could not do mode read request from device"
231 " (Geyser 3 mode)"); 241 " (Geyser Raw mode)");
232 return -EIO; 242 return -EIO;
233 } 243 }
234 244
235 /* Apply the mode switch */ 245 /* Apply the mode switch */
236 data[0] = ATP_GEYSER3_MODE_VENDOR_VALUE; 246 data[0] = ATP_GEYSER_MODE_VENDOR_VALUE;
237 247
238 size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 248 size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
239 ATP_GEYSER3_MODE_WRITE_REQUEST_ID, 249 ATP_GEYSER_MODE_WRITE_REQUEST_ID,
240 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 250 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
241 ATP_GEYSER3_MODE_REQUEST_VALUE, 251 ATP_GEYSER_MODE_REQUEST_VALUE,
242 ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000); 252 ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000);
243 253
244 if (size != 8) { 254 if (size != 8) {
245 err("Could not do mode write request to device" 255 err("Could not do mode write request to device"
246 " (Geyser 3 mode)"); 256 " (Geyser Raw mode)");
247 return -EIO; 257 return -EIO;
248 } 258 }
249 return 0; 259 return 0;
250} 260}
251 261
252/* Reinitialise the device if it's a geyser 3 */ 262/*
263 * Reinitialise the device. This usually stops stream of empty packets
264 * coming from it.
265 */
253static void atp_reinit(struct work_struct *work) 266static void atp_reinit(struct work_struct *work)
254{ 267{
255 struct atp *dev = container_of(work, struct atp, work); 268 struct atp *dev = container_of(work, struct atp, work);
256 struct usb_device *udev = dev->udev; 269 struct usb_device *udev = dev->udev;
270 int retval;
257 271
258 dev->idlecount = 0; 272 dev->idlecount = 0;
259 atp_geyser3_init(udev); 273
274 atp_geyser_init(udev);
275
276 retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
277 if (retval) {
278 err("%s - usb_submit_urb failed with result %d",
279 __FUNCTION__, retval);
280 }
260} 281}
261 282
262static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact, 283static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact,
@@ -337,7 +358,7 @@ static void atp_complete(struct urb* urb)
337 break; 358 break;
338 case -EOVERFLOW: 359 case -EOVERFLOW:
339 if(!dev->overflowwarn) { 360 if(!dev->overflowwarn) {
340 printk("appletouch: OVERFLOW with data " 361 printk(KERN_WARNING "appletouch: OVERFLOW with data "
341 "length %d, actual length is %d\n", 362 "length %d, actual length is %d\n",
342 dev->datalen, dev->urb->actual_length); 363 dev->datalen, dev->urb->actual_length);
343 dev->overflowwarn = 1; 364 dev->overflowwarn = 1;
@@ -426,15 +447,17 @@ static void atp_complete(struct urb* urb)
426 dev->x_old = dev->y_old = -1; 447 dev->x_old = dev->y_old = -1;
427 memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old)); 448 memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old));
428 449
429 if (atp_is_geyser_3(dev)) /* No 17" Macbooks (yet) */ 450 if (dev->size_detect_done ||
451 atp_is_geyser_3(dev)) /* No 17" Macbooks (yet) */
430 goto exit; 452 goto exit;
431 453
432 /* 17" Powerbooks have extra X sensors */ 454 /* 17" Powerbooks have extra X sensors */
433 for (i = (atp_is_geyser_2(dev)?15:16); i < ATP_XSENSORS; i++) { 455 for (i = (atp_is_geyser_2(dev) ? 15 : 16); i < ATP_XSENSORS; i++) {
434 if (!dev->xy_cur[i]) continue; 456 if (!dev->xy_cur[i])
457 continue;
435 458
436 printk("appletouch: 17\" model detected.\n"); 459 printk(KERN_INFO "appletouch: 17\" model detected.\n");
437 if(atp_is_geyser_2(dev)) 460 if (atp_is_geyser_2(dev))
438 input_set_abs_params(dev->input, ABS_X, 0, 461 input_set_abs_params(dev->input, ABS_X, 0,
439 (20 - 1) * 462 (20 - 1) *
440 ATP_XFACT - 1, 463 ATP_XFACT - 1,
@@ -444,10 +467,10 @@ static void atp_complete(struct urb* urb)
444 (ATP_XSENSORS - 1) * 467 (ATP_XSENSORS - 1) *
445 ATP_XFACT - 1, 468 ATP_XFACT - 1,
446 ATP_FUZZ, 0); 469 ATP_FUZZ, 0);
447
448 break; 470 break;
449 } 471 }
450 472
473 dev->size_detect_done = 1;
451 goto exit; 474 goto exit;
452 } 475 }
453 476
@@ -479,7 +502,7 @@ static void atp_complete(struct urb* urb)
479 dev->y_old = y; 502 dev->y_old = y;
480 503
481 if (debug > 1) 504 if (debug > 1)
482 printk("appletouch: X: %3d Y: %3d " 505 printk(KERN_DEBUG "appletouch: X: %3d Y: %3d "
483 "Xz: %3d Yz: %3d\n", 506 "Xz: %3d Yz: %3d\n",
484 x, y, x_z, y_z); 507 x, y, x_z, y_z);
485 508
@@ -507,19 +530,25 @@ static void atp_complete(struct urb* urb)
507 input_report_key(dev->input, BTN_LEFT, key); 530 input_report_key(dev->input, BTN_LEFT, key);
508 input_sync(dev->input); 531 input_sync(dev->input);
509 532
510 /* Many Geysers will continue to send packets continually after 533 /*
511 the first touch unless reinitialised. Do so if it's been 534 * Many Geysers will continue to send packets continually after
512 idle for a while in order to avoid waking the kernel up 535 * the first touch unless reinitialised. Do so if it's been
513 several hundred times a second */ 536 * idle for a while in order to avoid waking the kernel up
514 537 * several hundred times a second. Re-initialization does not
515 if (!x && !y && !key) { 538 * work on Fountain touchpads.
516 dev->idlecount++; 539 */
517 if (dev->idlecount == 10) { 540 if (!atp_is_fountain(dev)) {
518 dev->valid = 0; 541 if (!x && !y && !key) {
519 schedule_work(&dev->work); 542 dev->idlecount++;
520 } 543 if (dev->idlecount == 10) {
521 } else 544 dev->valid = 0;
522 dev->idlecount = 0; 545 schedule_work(&dev->work);
546 /* Don't resubmit urb here, wait for reinit */
547 return;
548 }
549 } else
550 dev->idlecount = 0;
551 }
523 552
524exit: 553exit:
525 retval = usb_submit_urb(dev->urb, GFP_ATOMIC); 554 retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
@@ -593,12 +622,12 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id
593 else 622 else
594 dev->datalen = 81; 623 dev->datalen = 81;
595 624
596 if (atp_is_geyser_3(dev)) { 625 if (!atp_is_fountain(dev)) {
597 /* switch to raw sensor mode */ 626 /* switch to raw sensor mode */
598 if (atp_geyser3_init(udev)) 627 if (atp_geyser_init(udev))
599 goto err_free_devs; 628 goto err_free_devs;
600 629
601 printk("appletouch Geyser 3 inited.\n"); 630 printk(KERN_INFO "appletouch: Geyser mode initialized.\n");
602 } 631 }
603 632
604 dev->urb = usb_alloc_urb(0, GFP_KERNEL); 633 dev->urb = usb_alloc_urb(0, GFP_KERNEL);
diff --git a/drivers/input/mouse/inport.c b/drivers/input/mouse/inport.c
index 655a39217432..26ec09529b51 100644
--- a/drivers/input/mouse/inport.c
+++ b/drivers/input/mouse/inport.c
@@ -144,7 +144,7 @@ static int __init inport_init(void)
144 b = inb(INPORT_SIGNATURE_PORT); 144 b = inb(INPORT_SIGNATURE_PORT);
145 c = inb(INPORT_SIGNATURE_PORT); 145 c = inb(INPORT_SIGNATURE_PORT);
146 if (a == b || a != c) { 146 if (a == b || a != c) {
147 printk(KERN_ERR "inport.c: Didn't find InPort mouse at %#x\n", INPORT_BASE); 147 printk(KERN_INFO "inport.c: Didn't find InPort mouse at %#x\n", INPORT_BASE);
148 err = -ENODEV; 148 err = -ENODEV;
149 goto err_release_region; 149 goto err_release_region;
150 } 150 }
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c
index 9ec57d80186e..df81b0aaa9f8 100644
--- a/drivers/input/mouse/lifebook.c
+++ b/drivers/input/mouse/lifebook.c
@@ -225,8 +225,13 @@ static void lifebook_set_resolution(struct psmouse *psmouse, unsigned int resolu
225 225
226static void lifebook_disconnect(struct psmouse *psmouse) 226static void lifebook_disconnect(struct psmouse *psmouse)
227{ 227{
228 struct lifebook_data *priv = psmouse->private;
229
228 psmouse_reset(psmouse); 230 psmouse_reset(psmouse);
229 kfree(psmouse->private); 231 if (priv) {
232 input_unregister_device(priv->dev2);
233 kfree(priv);
234 }
230 psmouse->private = NULL; 235 psmouse->private = NULL;
231} 236}
232 237
diff --git a/drivers/input/mouse/logibm.c b/drivers/input/mouse/logibm.c
index b23a4f3ea5cd..37e7c75b43bd 100644
--- a/drivers/input/mouse/logibm.c
+++ b/drivers/input/mouse/logibm.c
@@ -134,7 +134,7 @@ static int __init logibm_init(void)
134 udelay(100); 134 udelay(100);
135 135
136 if (inb(LOGIBM_SIGNATURE_PORT) != LOGIBM_SIGNATURE_BYTE) { 136 if (inb(LOGIBM_SIGNATURE_PORT) != LOGIBM_SIGNATURE_BYTE) {
137 printk(KERN_ERR "logibm.c: Didn't find Logitech busmouse at %#x\n", LOGIBM_BASE); 137 printk(KERN_INFO "logibm.c: Didn't find Logitech busmouse at %#x\n", LOGIBM_BASE);
138 err = -ENODEV; 138 err = -ENODEV;
139 goto err_release_region; 139 goto err_release_region;
140 } 140 }
diff --git a/drivers/input/mouse/pc110pad.c b/drivers/input/mouse/pc110pad.c
index 8991ab0b4fe3..61cff8374e6c 100644
--- a/drivers/input/mouse/pc110pad.c
+++ b/drivers/input/mouse/pc110pad.c
@@ -39,6 +39,7 @@
39#include <linux/init.h> 39#include <linux/init.h>
40#include <linux/interrupt.h> 40#include <linux/interrupt.h>
41#include <linux/pci.h> 41#include <linux/pci.h>
42#include <linux/delay.h>
42 43
43#include <asm/io.h> 44#include <asm/io.h>
44#include <asm/irq.h> 45#include <asm/irq.h>
@@ -62,8 +63,10 @@ static irqreturn_t pc110pad_interrupt(int irq, void *ptr)
62 int value = inb_p(pc110pad_io); 63 int value = inb_p(pc110pad_io);
63 int handshake = inb_p(pc110pad_io + 2); 64 int handshake = inb_p(pc110pad_io + 2);
64 65
65 outb_p(handshake | 1, pc110pad_io + 2); 66 outb(handshake | 1, pc110pad_io + 2);
66 outb_p(handshake & ~1, pc110pad_io + 2); 67 udelay(2);
68 outb(handshake & ~1, pc110pad_io + 2);
69 udelay(2);
67 inb_p(0x64); 70 inb_p(0x64);
68 71
69 pc110pad_data[pc110pad_count++] = value; 72 pc110pad_data[pc110pad_count++] = value;
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index 21a9c0b69a1f..b8628252e10c 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -1247,6 +1247,8 @@ static int psmouse_connect(struct serio *serio, struct serio_driver *drv)
1247 err_pt_deactivate: 1247 err_pt_deactivate:
1248 if (parent && parent->pt_deactivate) 1248 if (parent && parent->pt_deactivate)
1249 parent->pt_deactivate(parent); 1249 parent->pt_deactivate(parent);
1250 input_unregister_device(psmouse->dev);
1251 input_dev = NULL; /* so we don't try to free it below */
1250 err_protocol_disconnect: 1252 err_protocol_disconnect:
1251 if (psmouse->disconnect) 1253 if (psmouse->disconnect)
1252 psmouse->disconnect(psmouse); 1254 psmouse->disconnect(psmouse);
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index 78c3ea75da2a..be83516c776c 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -1029,6 +1029,15 @@ static const struct input_device_id mousedev_ids[] = {
1029 BIT_MASK(ABS_PRESSURE) | 1029 BIT_MASK(ABS_PRESSURE) |
1030 BIT_MASK(ABS_TOOL_WIDTH) }, 1030 BIT_MASK(ABS_TOOL_WIDTH) },
1031 }, /* A touchpad */ 1031 }, /* A touchpad */
1032 {
1033 .flags = INPUT_DEVICE_ID_MATCH_EVBIT |
1034 INPUT_DEVICE_ID_MATCH_KEYBIT |
1035 INPUT_DEVICE_ID_MATCH_ABSBIT,
1036 .evbit = { BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_SYN) },
1037 .keybit = { [BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) },
1038 .absbit = { BIT_MASK(ABS_X) | BIT_MASK(ABS_Y) },
1039 }, /* Mouse-like device with absolute X and Y but ordinary
1040 clicks, like hp ILO2 High Performance mouse */
1032 1041
1033 { }, /* Terminating entry */ 1042 { }, /* Terminating entry */
1034}; 1043};
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
index 5ce632ca6815..b88569e21d60 100644
--- a/drivers/input/serio/Kconfig
+++ b/drivers/input/serio/Kconfig
@@ -21,7 +21,7 @@ if SERIO
21config SERIO_I8042 21config SERIO_I8042
22 tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 22 tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86
23 default y 23 default y
24 depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K && !BFIN 24 depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K && !BLACKFIN
25 ---help--- 25 ---help---
26 i8042 is the chip over which the standard AT keyboard and PS/2 26 i8042 is the chip over which the standard AT keyboard and PS/2
27 mouse are connected to the computer. If you use these devices, 27 mouse are connected to the computer. If you use these devices,
diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c
index 6af199805ffc..02b3ad8c0826 100644
--- a/drivers/input/serio/hp_sdc.c
+++ b/drivers/input/serio/hp_sdc.c
@@ -944,11 +944,7 @@ static int __init hp_sdc_init_hppa(struct parisc_device *d)
944 944
945#endif /* __hppa__ */ 945#endif /* __hppa__ */
946 946
947#if !defined(__mc68000__) /* Link error on m68k! */
948static void __exit hp_sdc_exit(void)
949#else
950static void hp_sdc_exit(void) 947static void hp_sdc_exit(void)
951#endif
952{ 948{
953 write_lock_irq(&hp_sdc.lock); 949 write_lock_irq(&hp_sdc.lock);
954 950
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index f8fe42148093..c5e68dcd88ac 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -110,6 +110,14 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
110 DMI_MATCH(DMI_PRODUCT_VERSION, "5a"), 110 DMI_MATCH(DMI_PRODUCT_VERSION, "5a"),
111 }, 111 },
112 }, 112 },
113 {
114 .ident = "Microsoft Virtual Machine",
115 .matches = {
116 DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
117 DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
118 DMI_MATCH(DMI_PRODUCT_VERSION, "VS2005R2"),
119 },
120 },
113 { } 121 { }
114}; 122};
115 123
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index fa8442b6241c..90e8e92dfe47 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -115,19 +115,17 @@ config TOUCHSCREEN_MK712
115 module will be called mk712. 115 module will be called mk712.
116 116
117config TOUCHSCREEN_HP600 117config TOUCHSCREEN_HP600
118 tristate "HP Jornada 680/690 touchscreen" 118 tristate "HP Jornada 6xx touchscreen"
119 depends on SH_HP6XX && SH_ADC 119 depends on SH_HP6XX && SH_ADC
120 help 120 help
121 Say Y here if you have a HP Jornada 680 or 690 and want to 121 Say Y here if you have a HP Jornada 620/660/680/690 and want to
122 support the built-in touchscreen. 122 support the built-in touchscreen.
123 123
124 If unsure, say N.
125
126 To compile this driver as a module, choose M here: the 124 To compile this driver as a module, choose M here: the
127 module will be called hp680_ts_input. 125 module will be called hp680_ts_input.
128 126
129config TOUCHSCREEN_HP7XX 127config TOUCHSCREEN_HP7XX
130 tristate "HP Jornada 710/720/728 touchscreen" 128 tristate "HP Jornada 7xx touchscreen"
131 depends on SA1100_JORNADA720_SSP 129 depends on SA1100_JORNADA720_SSP
132 help 130 help
133 Say Y here if you have a HP Jornada 710/720/728 and want 131 Say Y here if you have a HP Jornada 710/720/728 and want
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index f59aecf5ec15..fd9c5d51870a 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -267,13 +267,12 @@ static int ads7846_read12_ser(struct device *dev, unsigned command)
267 ts->irq_disabled = 0; 267 ts->irq_disabled = 0;
268 enable_irq(spi->irq); 268 enable_irq(spi->irq);
269 269
270 if (req->msg.status) 270 if (status == 0) {
271 status = req->msg.status; 271 /* on-wire is a must-ignore bit, a BE12 value, then padding */
272 272 sample = be16_to_cpu(req->sample);
273 /* on-wire is a must-ignore bit, a BE12 value, then padding */ 273 sample = sample >> 3;
274 sample = be16_to_cpu(req->sample); 274 sample &= 0x0fff;
275 sample = sample >> 3; 275 }
276 sample &= 0x0fff;
277 276
278 kfree(req); 277 kfree(req);
279 return status ? status : sample; 278 return status ? status : sample;
diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c
index b1b2e07bf080..99d92f5c93d6 100644
--- a/drivers/input/touchscreen/corgi_ts.c
+++ b/drivers/input/touchscreen/corgi_ts.c
@@ -74,10 +74,10 @@ extern unsigned int get_clk_frequency_khz(int info);
74 74
75static unsigned long calc_waittime(struct corgi_ts *corgi_ts) 75static unsigned long calc_waittime(struct corgi_ts *corgi_ts)
76{ 76{
77 unsigned long hsync_len = corgi_ts->machinfo->get_hsync_len(); 77 unsigned long hsync_invperiod = corgi_ts->machinfo->get_hsync_invperiod();
78 78
79 if (hsync_len) 79 if (hsync_invperiod)
80 return get_clk_frequency_khz(0)*1000/hsync_len; 80 return get_clk_frequency_khz(0)*1000/hsync_invperiod;
81 else 81 else
82 return 0; 82 return 0;
83} 83}
@@ -114,7 +114,7 @@ static int sync_receive_data_send_cmd(struct corgi_ts *corgi_ts, int doRecive, i
114 if (timer2-timer1 > wait_time) { 114 if (timer2-timer1 > wait_time) {
115 /* too slow - timeout, try again */ 115 /* too slow - timeout, try again */
116 corgi_ts->machinfo->wait_hsync(); 116 corgi_ts->machinfo->wait_hsync();
117 /* get OSCR */ 117 /* get CCNT */
118 CCNT(timer1); 118 CCNT(timer1);
119 /* Wait after HSync */ 119 /* Wait after HSync */
120 CCNT(timer2); 120 CCNT(timer2);
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c
index 7549939b9535..986a8365e37f 100644
--- a/drivers/input/touchscreen/ucb1400_ts.c
+++ b/drivers/input/touchscreen/ucb1400_ts.c
@@ -27,7 +27,6 @@
27#include <linux/kthread.h> 27#include <linux/kthread.h>
28#include <linux/freezer.h> 28#include <linux/freezer.h>
29 29
30#include <sound/driver.h>
31#include <sound/core.h> 30#include <sound/core.h>
32#include <sound/ac97_codec.h> 31#include <sound/ac97_codec.h>
33 32
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index 19055e7381f8..63f9664a066f 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -11,6 +11,7 @@
11 * - DMC TSC-10/25 11 * - DMC TSC-10/25
12 * - IRTOUCHSYSTEMS/UNITOP 12 * - IRTOUCHSYSTEMS/UNITOP
13 * - IdealTEK URTC1000 13 * - IdealTEK URTC1000
14 * - General Touch
14 * - GoTop Super_Q2/GogoPen/PenPower tablets 15 * - GoTop Super_Q2/GogoPen/PenPower tablets
15 * 16 *
16 * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch> 17 * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch>
@@ -50,7 +51,7 @@
50#include <linux/usb/input.h> 51#include <linux/usb/input.h>
51 52
52 53
53#define DRIVER_VERSION "v0.5" 54#define DRIVER_VERSION "v0.6"
54#define DRIVER_AUTHOR "Daniel Ritz <daniel.ritz@gmx.ch>" 55#define DRIVER_AUTHOR "Daniel Ritz <daniel.ritz@gmx.ch>"
55#define DRIVER_DESC "USB Touchscreen Driver" 56#define DRIVER_DESC "USB Touchscreen Driver"
56 57
@@ -65,17 +66,21 @@ struct usbtouch_device_info {
65 int min_yc, max_yc; 66 int min_yc, max_yc;
66 int min_press, max_press; 67 int min_press, max_press;
67 int rept_size; 68 int rept_size;
68 int flags;
69 69
70 void (*process_pkt) (struct usbtouch_usb *usbtouch, unsigned char *pkt, int len); 70 void (*process_pkt) (struct usbtouch_usb *usbtouch, unsigned char *pkt, int len);
71
72 /*
73 * used to get the packet len. possible return values:
74 * > 0: packet len
75 * = 0: skip one byte
76 * < 0: -return value more bytes needed
77 */
71 int (*get_pkt_len) (unsigned char *pkt, int len); 78 int (*get_pkt_len) (unsigned char *pkt, int len);
79
72 int (*read_data) (struct usbtouch_usb *usbtouch, unsigned char *pkt); 80 int (*read_data) (struct usbtouch_usb *usbtouch, unsigned char *pkt);
73 int (*init) (struct usbtouch_usb *usbtouch); 81 int (*init) (struct usbtouch_usb *usbtouch);
74}; 82};
75 83
76#define USBTOUCH_FLG_BUFFER 0x01
77
78
79/* a usbtouch device */ 84/* a usbtouch device */
80struct usbtouch_usb { 85struct usbtouch_usb {
81 unsigned char *data; 86 unsigned char *data;
@@ -94,15 +99,6 @@ struct usbtouch_usb {
94}; 99};
95 100
96 101
97#if defined(CONFIG_TOUCHSCREEN_USB_EGALAX) || defined(CONFIG_TOUCHSCREEN_USB_ETURBO) || defined(CONFIG_TOUCHSCREEN_USB_IDEALTEK)
98#define MULTI_PACKET
99#endif
100
101#ifdef MULTI_PACKET
102static void usbtouch_process_multi(struct usbtouch_usb *usbtouch,
103 unsigned char *pkt, int len);
104#endif
105
106/* device types */ 102/* device types */
107enum { 103enum {
108 DEVTPYE_DUMMY = -1, 104 DEVTPYE_DUMMY = -1,
@@ -186,6 +182,10 @@ static struct usb_device_id usbtouch_devices[] = {
186 182
187#ifdef CONFIG_TOUCHSCREEN_USB_EGALAX 183#ifdef CONFIG_TOUCHSCREEN_USB_EGALAX
188 184
185#ifndef MULTI_PACKET
186#define MULTI_PACKET
187#endif
188
189#define EGALAX_PKT_TYPE_MASK 0xFE 189#define EGALAX_PKT_TYPE_MASK 0xFE
190#define EGALAX_PKT_TYPE_REPT 0x80 190#define EGALAX_PKT_TYPE_REPT 0x80
191#define EGALAX_PKT_TYPE_DIAG 0x0A 191#define EGALAX_PKT_TYPE_DIAG 0x0A
@@ -323,6 +323,9 @@ static int itm_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
323 * eTurboTouch part 323 * eTurboTouch part
324 */ 324 */
325#ifdef CONFIG_TOUCHSCREEN_USB_ETURBO 325#ifdef CONFIG_TOUCHSCREEN_USB_ETURBO
326#ifndef MULTI_PACKET
327#define MULTI_PACKET
328#endif
326static int eturbo_read_data(struct usbtouch_usb *dev, unsigned char *pkt) 329static int eturbo_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
327{ 330{
328 unsigned int shift; 331 unsigned int shift;
@@ -461,6 +464,9 @@ static int irtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
461 * IdealTEK URTC1000 Part 464 * IdealTEK URTC1000 Part
462 */ 465 */
463#ifdef CONFIG_TOUCHSCREEN_USB_IDEALTEK 466#ifdef CONFIG_TOUCHSCREEN_USB_IDEALTEK
467#ifndef MULTI_PACKET
468#define MULTI_PACKET
469#endif
464static int idealtek_get_pkt_len(unsigned char *buf, int len) 470static int idealtek_get_pkt_len(unsigned char *buf, int len)
465{ 471{
466 if (buf[0] & 0x80) 472 if (buf[0] & 0x80)
@@ -525,6 +531,11 @@ static int gotop_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
525/***************************************************************************** 531/*****************************************************************************
526 * the different device descriptors 532 * the different device descriptors
527 */ 533 */
534#ifdef MULTI_PACKET
535static void usbtouch_process_multi(struct usbtouch_usb *usbtouch,
536 unsigned char *pkt, int len);
537#endif
538
528static struct usbtouch_device_info usbtouch_dev_info[] = { 539static struct usbtouch_device_info usbtouch_dev_info[] = {
529#ifdef CONFIG_TOUCHSCREEN_USB_EGALAX 540#ifdef CONFIG_TOUCHSCREEN_USB_EGALAX
530 [DEVTYPE_EGALAX] = { 541 [DEVTYPE_EGALAX] = {
@@ -533,7 +544,6 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
533 .min_yc = 0x0, 544 .min_yc = 0x0,
534 .max_yc = 0x07ff, 545 .max_yc = 0x07ff,
535 .rept_size = 16, 546 .rept_size = 16,
536 .flags = USBTOUCH_FLG_BUFFER,
537 .process_pkt = usbtouch_process_multi, 547 .process_pkt = usbtouch_process_multi,
538 .get_pkt_len = egalax_get_pkt_len, 548 .get_pkt_len = egalax_get_pkt_len,
539 .read_data = egalax_read_data, 549 .read_data = egalax_read_data,
@@ -582,7 +592,6 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
582 .min_yc = 0x0, 592 .min_yc = 0x0,
583 .max_yc = 0x07ff, 593 .max_yc = 0x07ff,
584 .rept_size = 8, 594 .rept_size = 8,
585 .flags = USBTOUCH_FLG_BUFFER,
586 .process_pkt = usbtouch_process_multi, 595 .process_pkt = usbtouch_process_multi,
587 .get_pkt_len = eturbo_get_pkt_len, 596 .get_pkt_len = eturbo_get_pkt_len,
588 .read_data = eturbo_read_data, 597 .read_data = eturbo_read_data,
@@ -630,7 +639,6 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
630 .min_yc = 0x0, 639 .min_yc = 0x0,
631 .max_yc = 0x0fff, 640 .max_yc = 0x0fff,
632 .rept_size = 8, 641 .rept_size = 8,
633 .flags = USBTOUCH_FLG_BUFFER,
634 .process_pkt = usbtouch_process_multi, 642 .process_pkt = usbtouch_process_multi,
635 .get_pkt_len = idealtek_get_pkt_len, 643 .get_pkt_len = idealtek_get_pkt_len,
636 .read_data = idealtek_read_data, 644 .read_data = idealtek_read_data,
@@ -738,11 +746,14 @@ static void usbtouch_process_multi(struct usbtouch_usb *usbtouch,
738 pos = 0; 746 pos = 0;
739 while (pos < buf_len) { 747 while (pos < buf_len) {
740 /* get packet len */ 748 /* get packet len */
741 pkt_len = usbtouch->type->get_pkt_len(buffer + pos, len); 749 pkt_len = usbtouch->type->get_pkt_len(buffer + pos,
750 buf_len - pos);
742 751
743 /* unknown packet: drop everything */ 752 /* unknown packet: skip one byte */
744 if (unlikely(!pkt_len)) 753 if (unlikely(!pkt_len)) {
745 goto out_flush_buf; 754 pos++;
755 continue;
756 }
746 757
747 /* full packet: process */ 758 /* full packet: process */
748 if (likely((pkt_len > 0) && (pkt_len <= buf_len - pos))) { 759 if (likely((pkt_len > 0) && (pkt_len <= buf_len - pos))) {
@@ -857,7 +868,7 @@ static int usbtouch_probe(struct usb_interface *intf,
857 if (!usbtouch->data) 868 if (!usbtouch->data)
858 goto out_free; 869 goto out_free;
859 870
860 if (type->flags & USBTOUCH_FLG_BUFFER) { 871 if (type->get_pkt_len) {
861 usbtouch->buffer = kmalloc(type->rept_size, GFP_KERNEL); 872 usbtouch->buffer = kmalloc(type->rept_size, GFP_KERNEL);
862 if (!usbtouch->buffer) 873 if (!usbtouch->buffer)
863 goto out_free_buffers; 874 goto out_free_buffers;