aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio
diff options
context:
space:
mode:
authorCarlos Corbacho <carlos@strangeworlds.co.uk>2008-01-21 01:04:40 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-01-21 01:11:08 -0500
commit8987fec0de0a4b71dd345052ea4271eaf05f7956 (patch)
treeca26d4d0a7cb2aec66b20c9cfb1d53d1fadb9406 /drivers/input/serio
parent93e9012f40f75b8ab8a37deaf532b3c5e9b527c6 (diff)
Input: i8042 - add Dritek keyboard extension quirk
Some Wistron based laptops need us to explicitly enable the 'Dritek keyboard extension' to make their extra keys start generating scancodes. Originally, this was just confined to older laptops, but a few Acer laptops have turned up in 2007 that also need this again. Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/serio')
-rw-r--r--drivers/input/serio/i8042-x86ia64io.h49
-rw-r--r--drivers/input/serio/i8042.c14
2 files changed, 63 insertions, 0 deletions
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index c5e68dcd88ac..4f6384d8e090 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -277,6 +277,50 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
277 277
278#endif 278#endif
279 279
280#ifdef CONFIG_X86
281
282#include <linux/dmi.h>
283
284/*
285 * Some Wistron based laptops need us to explicitly enable the 'Dritek
286 * keyboard extension' to make their extra keys start generating scancodes.
287 * Originally, this was just confined to older laptops, but a few Acer laptops
288 * have turned up in 2007 that also need this again.
289 */
290static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = {
291 {
292 .ident = "Acer Aspire 5630",
293 .matches = {
294 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
295 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5630"),
296 },
297 },
298 {
299 .ident = "Acer Aspire 5650",
300 .matches = {
301 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
302 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5650"),
303 },
304 },
305 {
306 .ident = "Acer Aspire 5680",
307 .matches = {
308 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
309 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5680"),
310 },
311 },
312 {
313 .ident = "Acer TravelMate 2490",
314 .matches = {
315 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
316 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 2490"),
317 },
318 },
319 { }
320};
321
322#endif /* CONFIG_X86 */
323
280 324
281#ifdef CONFIG_PNP 325#ifdef CONFIG_PNP
282#include <linux/pnp.h> 326#include <linux/pnp.h>
@@ -520,6 +564,11 @@ static int __init i8042_platform_init(void)
520 i8042_nomux = 1; 564 i8042_nomux = 1;
521#endif 565#endif
522 566
567#ifdef CONFIG_X86
568 if (dmi_check_system(i8042_dmi_dritek_table))
569 i8042_dritek = 1;
570#endif /* CONFIG_X86 */
571
523 return retval; 572 return retval;
524} 573}
525 574
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index cbe83bf294c9..1f73cf72a7c5 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -63,6 +63,12 @@ static unsigned int i8042_blink_frequency = 500;
63module_param_named(panicblink, i8042_blink_frequency, uint, 0600); 63module_param_named(panicblink, i8042_blink_frequency, uint, 0600);
64MODULE_PARM_DESC(panicblink, "Frequency with which keyboard LEDs should blink when kernel panics"); 64MODULE_PARM_DESC(panicblink, "Frequency with which keyboard LEDs should blink when kernel panics");
65 65
66#ifdef CONFIG_X86
67static unsigned int i8042_dritek;
68module_param_named(dritek, i8042_dritek, bool, 0);
69MODULE_PARM_DESC(dritek, "Force enable the Dritek keyboard extension");
70#endif
71
66#ifdef CONFIG_PNP 72#ifdef CONFIG_PNP
67static int i8042_nopnp; 73static int i8042_nopnp;
68module_param_named(nopnp, i8042_nopnp, bool, 0); 74module_param_named(nopnp, i8042_nopnp, bool, 0);
@@ -1145,6 +1151,7 @@ static int __devinit i8042_setup_kbd(void)
1145static int __devinit i8042_probe(struct platform_device *dev) 1151static int __devinit i8042_probe(struct platform_device *dev)
1146{ 1152{
1147 int error; 1153 int error;
1154 char param;
1148 1155
1149 error = i8042_controller_selftest(); 1156 error = i8042_controller_selftest();
1150 if (error) 1157 if (error)
@@ -1166,6 +1173,13 @@ static int __devinit i8042_probe(struct platform_device *dev)
1166 goto out_fail; 1173 goto out_fail;
1167 } 1174 }
1168 1175
1176 if (i8042_dritek) {
1177 param = 0x90;
1178 error = i8042_command(&param, 0x1059);
1179 if (error)
1180 goto out_fail;
1181 }
1182
1169/* 1183/*
1170 * Ok, everything is ready, let's register all serio ports 1184 * Ok, everything is ready, let's register all serio ports
1171 */ 1185 */