X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Finput%2Fserio%2Fi8042.c;h=65a74cfc187b12199bb3f291775e9223da504198;hb=c36c804559d3a891a2e655ba8185b4fa7eaee156;hp=1a0cea3c52945fca48aa363d2f636030d715ca77;hpb=1212663fba7c5e003e05d24f043d5ed57eb18b24;p=linux-2.6-omap-h63xx.git diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 1a0cea3c529..65a74cfc187 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -12,7 +12,6 @@ #include #include -#include #include #include #include @@ -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; } @@ -1159,7 +1171,14 @@ static int __devinit i8042_probe(struct platform_device *dev) if (error) goto out_fail; } - +#ifdef CONFIG_X86 + if (i8042_dritek) { + char param = 0x90; + error = i8042_command(¶m, 0x1059); + if (error) + goto out_fail; + } +#endif /* * Ok, everything is ready, let's register all serio ports */