input: Add some extra PNP keyboard types
Subsystems (2)
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
@@ -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
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
@@ -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
PATCH 3/3 input: Default to only using PNP for i8042 probing on x86
In reply to Matthew GarrettExperimenting 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
@@ -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
@@ -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
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
Signed-off-by Matthew Garrett <[email protected]>--- 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@@ -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
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 ***
Re: [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86
In reply to Matthew GarrettOk, 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
Dmitry Torokhov
maintainerRe: [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86
In reply to Matthew GarrettQuoted 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
Signed-off-by Matthew Garrett <[email protected]>--- 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@@ -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@@ -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
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]
Dmitry Torokhov
maintainerRe: [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