Skip to contentSkip to conversation

input: Add some extra PNP keyboard types

PATCH Superseded Matthew Garrett 5 participants 8 messages May 14, 2010

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 input: Add some extra PNP keyboard types

Some Japanese machines declare their keyboard with a different PNP ID. Add it to the list of probed device IDs. While we're at it, add all the other IDs that Windows binds to - we'll probably never see them in the real world, but it doesn't hurt.

---
 drivers/input/serio/i8042-x86ia64io.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
drivers/input/serio/i8042-x86ia64io.h +13 -0
index ead0494..871a74c 100644
@@ -660,8 +660,21 @@ static int i8042_pnp_aux_probe(struct pnp_dev *dev, const struct pnp_device_id *
 }
 
 static struct pnp_device_id pnp_kbd_devids[] = {
+	{ .id = "PNP0300", .driver_data = 0 },
+	{ .id = "PNP0301", .driver_data = 0 },
+	{ .id = "PNP0302", .driver_data = 0 },
 	{ .id = "PNP0303", .driver_data = 0 },
+	{ .id = "PNP0304", .driver_data = 0 },
+	{ .id = "PNP0305", .driver_data = 0 },
+	{ .id = "PNP0306", .driver_data = 0 },
+	{ .id = "PNP0309", .driver_data = 0 },
+	{ .id = "PNP030a", .driver_data = 0 },
 	{ .id = "PNP030b", .driver_data = 0 },
+	{ .id = "PNP0320", .driver_data = 0 },
+	{ .id = "PNP0343", .driver_data = 0 },
+	{ .id = "PNP0344", .driver_data = 0 },
+	{ .id = "PNP0345", .driver_data = 0 },
+	{ .id = "CPQA0D7", .driver_data = 0 },
 	{ .id = "", },
 };
 
Signature · 1 line
1.7.0.1
#1 lore raw

PATCH 2/3 input: Add a PNP entry to the aux device list

Windows checks for an ALPS PS/2 device in PNP. Add it on the off-chance that there's a machine that expresses this without also providing a compatibility ID.

---
 drivers/input/serio/i8042-x86ia64io.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/input/serio/i8042-x86ia64io.h +1 -0
index 871a74c..6168469 100644
@@ -685,6 +685,7 @@ static struct pnp_driver i8042_pnp_kbd_driver = {
 };
 
 static struct pnp_device_id pnp_aux_devids[] = {
+	{ .id = "AUI0200", .driver_data = 0 },
 	{ .id = "FJC6000", .driver_data = 0 },
 	{ .id = "FJC6001", .driver_data = 0 },
 	{ .id = "PNP0f03", .driver_data = 0 },
Signature · 1 line
1.7.0.1
#2 lore raw

PATCH 3/3 input: Default to only using PNP for i8042 probing on x86

In reply to Matthew Garrett

Experimenting with Windows has revealed that it will not probe the keyboard controller unless a valid PNPACPI device is present. Change our behaviour to match, and add a new i8042.forcedprobe parameter to allow people to override it.

---
 drivers/input/serio/i8042-x86ia64io.h |    5 +++++
 drivers/input/serio/i8042.c           |    3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)
drivers/input/serio/i8042-x86ia64io.h +5 -0
index 6168469..2c5d9c0 100644
@@ -1,6 +1,8 @@
 #ifndef _I8042_X86IA64IO_H
 #define _I8042_X86IA64IO_H
 
+#include <linux/acpi.h>
+
 /*
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 as published by
@@ -747,6 +749,9 @@ static int __init i8042_pnp_init(void)
 #if defined(__ia64__)
 		return -ENODEV;
 #else
+		if (!acpi_disabled && !i8042_forceprobe)
+			return -ENODEV;
+
 		printk(KERN_INFO "PNP: No PS/2 controller found. Probing ports directly.\n");
 		return 0;
 #endif
drivers/input/serio/i8042.c +3 -0
index 6440a8f..413c5a6 100644
@@ -75,6 +75,9 @@ MODULE_PARM_DESC(dritek, "Force enable the Dritek keyboard extension");
 static bool i8042_nopnp;
 module_param_named(nopnp, i8042_nopnp, bool, 0);
 MODULE_PARM_DESC(nopnp, "Do not use PNP to detect controller settings");
+static bool i8042_forceprobe;
+module_param_named(forceprobe, i8042_forceprobe, bool, 0);
+MODULE_PARM_DESC(forceprobe, "Force probing even if no PNP devices were found");
 #endif
 
 #define DEBUG
Signature · 1 line
1.7.0.1
#3 lore raw

Re: [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86

Quoted 4 lines · On Fri, 14 May 2010 12:10:03 -0400 Matthew Garrett wrote:

Experimenting with Windows has revealed that it will not probe the keyboard controller unless a valid PNPACPI device is present. Change our behaviour to match, and add a new i8042.forcedprobe parameter to allow people to override it.

and add that parameter to Documentation/kernel-parameters.txt, please.

Quoted 35 lines
---
 drivers/input/serio/i8042-x86ia64io.h |    5 +++++
 drivers/input/serio/i8042.c           |    3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)
drivers/input/serio/i8042-x86ia64io.h +5 -0
index 6168469..2c5d9c0 100644
@@ -1,6 +1,8 @@
 #ifndef _I8042_X86IA64IO_H
 #define _I8042_X86IA64IO_H
 
+#include <linux/acpi.h>
+
 /*
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 as published by
@@ -747,6 +749,9 @@ static int __init i8042_pnp_init(void)
 #if defined(__ia64__)
 		return -ENODEV;
 #else
+		if (!acpi_disabled && !i8042_forceprobe)
+			return -ENODEV;
+
 		printk(KERN_INFO "PNP: No PS/2 controller found. Probing ports directly.\n");
 		return 0;
 #endif
drivers/input/serio/i8042.c +0 -0
index 6440a8f..413c5a6 100644

drivers/input/serio/i8042.c MODULE_PARM_DESC(dritek, "Force enable the Dritek keyboard extension"); · line 83

Quoted 9 lines
drivers/input/serio/i8042.c +3 -0
@@ -75,6 +75,9 @@ MODULE_PARM_DESC(dritek, "Force enable the Dritek keyboard extension");
 static bool i8042_nopnp;
 module_param_named(nopnp, i8042_nopnp, bool, 0);
 MODULE_PARM_DESC(nopnp, "Do not use PNP to detect controller settings");
+static bool i8042_forceprobe;
+module_param_named(forceprobe, i8042_forceprobe, bool, 0);
+MODULE_PARM_DESC(forceprobe, "Force probing even if no PNP devices were found");
 #endif
 
 #define DEBUG

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#4 lore raw

Re: [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86

In reply to Matthew Garrett

Ok, there's no way I'd merge this for 2.6.34 any more, but one comment:

Quoted 5 lines · Matthew Garrett

Experimenting with Windows has revealed that it will not probe the keyboard controller unless a valid PNPACPI device is present. Change our behaviour to match, and add a new i8042.forcedprobe parameter to allow people to override it.

If you do this, then please remove the nasty __ia64__ #ifdef while at it.

Linus

maintainer
#5 lore raw

Re: [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86

In reply to Matthew Garrett
Quoted 5 lines · Matthew Garrett

Experimenting with Windows has revealed that it will not probe the keyboard controller unless a valid PNPACPI device is present. Change our behaviour to match, and add a new i8042.forcedprobe parameter to allow people to override it.

i8042.nopnp would not do?

Quoted 46 lines
---
 drivers/input/serio/i8042-x86ia64io.h |    5 +++++
 drivers/input/serio/i8042.c           |    3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)
drivers/input/serio/i8042-x86ia64io.h +5 -0
index 6168469..2c5d9c0 100644
@@ -1,6 +1,8 @@
 #ifndef _I8042_X86IA64IO_H
 #define _I8042_X86IA64IO_H
 
+#include <linux/acpi.h>
+
 /*
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 as published by
@@ -747,6 +749,9 @@ static int __init i8042_pnp_init(void)
 #if defined(__ia64__)
 		return -ENODEV;
 #else
+		if (!acpi_disabled && !i8042_forceprobe)
+			return -ENODEV;
+
 		printk(KERN_INFO "PNP: No PS/2 controller found. Probing ports directly.\n");
 		return 0;
 #endif
drivers/input/serio/i8042.c +3 -0
index 6440a8f..413c5a6 100644
@@ -75,6 +75,9 @@ MODULE_PARM_DESC(dritek, "Force enable the Dritek keyboard extension");
 static bool i8042_nopnp;
 module_param_named(nopnp, i8042_nopnp, bool, 0);
 MODULE_PARM_DESC(nopnp, "Do not use PNP to detect controller settings");
+static bool i8042_forceprobe;
+module_param_named(forceprobe, i8042_forceprobe, bool, 0);
+MODULE_PARM_DESC(forceprobe, "Force probing even if no PNP devices were found");
 #endif
 
 #define DEBUG
Signature · 1 line
1.7.0.1
Signature · 1 line
Dmitry
#6 lore raw

Re: [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86

Quoted 8 lines · Dmitry Torokhov
Quoted 5 lines · Matthew Garrett

Experimenting with Windows has revealed that it will not probe the keyboard controller unless a valid PNPACPI device is present. Change our behaviour to match, and add a new i8042.forcedprobe parameter to allow people to override it.

i8042.nopnp would not do?

It could - it wouldn't be quite semantically equivalent, but I don't see why it wouldn't work.

Signature · 1 line
Matthew Garrett | [email protected]
maintainer
#7 lore raw

Re: [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86

Quoted 8 lines · Matthew Garrett
Quoted 7 lines · Dmitry Torokhov
Quoted 5 lines · Matthew Garrett

Experimenting with Windows has revealed that it will not probe the keyboard controller unless a valid PNPACPI device is present. Change our behaviour to match, and add a new i8042.forcedprobe parameter to allow people to override it.

Quoted 5 lines
Quoted 1 line

i8042.nopnp would not do?

It could - it wouldn't be quite semantically equivalent, but I don't see why it wouldn't work.

I think they are exactly equivalent - "piss on what PNP says, bang the ports directly".

Signature · 1 line
Dmitry