diff options
Diffstat (limited to 'drivers/input/serio/i8042.c')
-rw-r--r-- | drivers/input/serio/i8042.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 1a0cea3c5294..2763394869d2 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/moduleparam.h> | ||
16 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
17 | #include <linux/ioport.h> | 16 | #include <linux/ioport.h> |
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
@@ -64,6 +63,12 @@ static unsigned int i8042_blink_frequency = 500; | |||
64 | module_param_named(panicblink, i8042_blink_frequency, uint, 0600); | 63 | module_param_named(panicblink, i8042_blink_frequency, uint, 0600); |
65 | MODULE_PARM_DESC(panicblink, "Frequency with which keyboard LEDs should blink when kernel panics"); | 64 | MODULE_PARM_DESC(panicblink, "Frequency with which keyboard LEDs should blink when kernel panics"); |
66 | 65 | ||
66 | #ifdef CONFIG_X86 | ||
67 | static unsigned int i8042_dritek; | ||
68 | module_param_named(dritek, i8042_dritek, bool, 0); | ||
69 | MODULE_PARM_DESC(dritek, "Force enable the Dritek keyboard extension"); | ||
70 | #endif | ||
71 | |||
67 | #ifdef CONFIG_PNP | 72 | #ifdef CONFIG_PNP |
68 | static int i8042_nopnp; | 73 | static int i8042_nopnp; |
69 | module_param_named(nopnp, i8042_nopnp, bool, 0); | 74 | module_param_named(nopnp, i8042_nopnp, bool, 0); |
@@ -280,7 +285,14 @@ static void i8042_stop(struct serio *serio) | |||
280 | struct i8042_port *port = serio->port_data; | 285 | struct i8042_port *port = serio->port_data; |
281 | 286 | ||
282 | port->exists = 0; | 287 | port->exists = 0; |
283 | synchronize_sched(); | 288 | |
289 | /* | ||
290 | * We synchronize with both AUX and KBD IRQs because there is | ||
291 | * a (very unlikely) chance that AUX IRQ is raised for KBD port | ||
292 | * and vice versa. | ||
293 | */ | ||
294 | synchronize_irq(I8042_AUX_IRQ); | ||
295 | synchronize_irq(I8042_KBD_IRQ); | ||
284 | port->serio = NULL; | 296 | port->serio = NULL; |
285 | } | 297 | } |
286 | 298 | ||
@@ -1139,6 +1151,7 @@ static int __devinit i8042_setup_kbd(void) | |||
1139 | static int __devinit i8042_probe(struct platform_device *dev) | 1151 | static int __devinit i8042_probe(struct platform_device *dev) |
1140 | { | 1152 | { |
1141 | int error; | 1153 | int error; |
1154 | char param; | ||
1142 | 1155 | ||
1143 | error = i8042_controller_selftest(); | 1156 | error = i8042_controller_selftest(); |
1144 | if (error) | 1157 | if (error) |
@@ -1159,7 +1172,14 @@ static int __devinit i8042_probe(struct platform_device *dev) | |||
1159 | if (error) | 1172 | if (error) |
1160 | goto out_fail; | 1173 | goto out_fail; |
1161 | } | 1174 | } |
1162 | 1175 | #ifdef CONFIG_X86 | |
1176 | if (i8042_dritek) { | ||
1177 | param = 0x90; | ||
1178 | error = i8042_command(¶m, 0x1059); | ||
1179 | if (error) | ||
1180 | goto out_fail; | ||
1181 | } | ||
1182 | #endif | ||
1163 | /* | 1183 | /* |
1164 | * Ok, everything is ready, let's register all serio ports | 1184 | * Ok, everything is ready, let's register all serio ports |
1165 | */ | 1185 | */ |