summaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/i8042.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/serio/i8042.c')
-rw-r--r--drivers/input/serio/i8042.c26
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 @@
#include <linux/delay.h>
#include <linux/module.h>
-#include <linux/moduleparam.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/init.h>
@@ -64,6 +63,12 @@ static unsigned int i8042_blink_frequency = 500;
module_param_named(panicblink, i8042_blink_frequency, uint, 0600);
MODULE_PARM_DESC(panicblink, "Frequency with which keyboard LEDs should blink when kernel panics");
+#ifdef CONFIG_X86
+static unsigned int i8042_dritek;
+module_param_named(dritek, i8042_dritek, bool, 0);
+MODULE_PARM_DESC(dritek, "Force enable the Dritek keyboard extension");
+#endif
+
#ifdef CONFIG_PNP
static int i8042_nopnp;
module_param_named(nopnp, i8042_nopnp, bool, 0);
@@ -280,7 +285,14 @@ static void i8042_stop(struct serio *serio)
struct i8042_port *port = serio->port_data;
port->exists = 0;
- synchronize_sched();
+
+ /*
+ * We synchronize with both AUX and KBD IRQs because there is
+ * a (very unlikely) chance that AUX IRQ is raised for KBD port
+ * and vice versa.
+ */
+ synchronize_irq(I8042_AUX_IRQ);
+ synchronize_irq(I8042_KBD_IRQ);
port->serio = NULL;
}
@@ -1139,6 +1151,7 @@ static int __devinit i8042_setup_kbd(void)
static int __devinit i8042_probe(struct platform_device *dev)
{
int error;
+ char param;
error = i8042_controller_selftest();
if (error)
@@ -1159,7 +1172,14 @@ static int __devinit i8042_probe(struct platform_device *dev)
if (error)
goto out_fail;
}
-
+#ifdef CONFIG_X86
+ if (i8042_dritek) {
+ param = 0x90;
+ error = i8042_command(&param, 0x1059);
+ if (error)
+ goto out_fail;
+ }
+#endif
/*
* Ok, everything is ready, let's register all serio ports
*/