linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] input: Add some extra PNP keyboard types
@ 2010-05-14 16:10 Matthew Garrett
  2010-05-14 16:10 ` [PATCH 2/3] input: Add a PNP entry to the aux device list Matthew Garrett
  2010-05-14 16:10 ` [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86 Matthew Garrett
  0 siblings, 2 replies; 8+ messages in thread
From: Matthew Garrett @ 2010-05-14 16:10 UTC (permalink / raw)
  To: linux-input; +Cc: dmitry.torokhov, linux-kernel, torvalds, Matthew Garrett

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.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
 drivers/input/serio/i8042-x86ia64io.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index ead0494..871a74c 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -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 = "", },
 };
 
-- 
1.7.0.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] input: Add a PNP entry to the aux device list
  2010-05-14 16:10 [PATCH 1/3] input: Add some extra PNP keyboard types Matthew Garrett
@ 2010-05-14 16:10 ` Matthew Garrett
  2010-05-14 16:10 ` [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86 Matthew Garrett
  1 sibling, 0 replies; 8+ messages in thread
From: Matthew Garrett @ 2010-05-14 16:10 UTC (permalink / raw)
  To: linux-input; +Cc: dmitry.torokhov, linux-kernel, torvalds, Matthew Garrett

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.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
 drivers/input/serio/i8042-x86ia64io.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 871a74c..6168469 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -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 },
-- 
1.7.0.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86
  2010-05-14 16:10 [PATCH 1/3] input: Add some extra PNP keyboard types Matthew Garrett
  2010-05-14 16:10 ` [PATCH 2/3] input: Add a PNP entry to the aux device list Matthew Garrett
@ 2010-05-14 16:10 ` Matthew Garrett
  2010-05-14 16:15   ` Randy Dunlap
                     ` (2 more replies)
  1 sibling, 3 replies; 8+ messages in thread
From: Matthew Garrett @ 2010-05-14 16:10 UTC (permalink / raw)
  To: linux-input; +Cc: dmitry.torokhov, linux-kernel, torvalds, 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.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
 drivers/input/serio/i8042-x86ia64io.h |    5 +++++
 drivers/input/serio/i8042.c           |    3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 6168469..2c5d9c0 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -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
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 6440a8f..413c5a6 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -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
-- 
1.7.0.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86
  2010-05-14 16:10 ` [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86 Matthew Garrett
@ 2010-05-14 16:15   ` Randy Dunlap
  2010-05-14 16:19   ` Linus Torvalds
  2010-05-14 16:31   ` Dmitry Torokhov
  2 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2010-05-14 16:15 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-input, dmitry.torokhov, linux-kernel, torvalds

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.


> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> ---
>  drivers/input/serio/i8042-x86ia64io.h |    5 +++++
>  drivers/input/serio/i8042.c           |    3 +++
>  2 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
> index 6168469..2c5d9c0 100644
> --- a/drivers/input/serio/i8042-x86ia64io.h
> +++ b/drivers/input/serio/i8042-x86ia64io.h
> @@ -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
> diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
> index 6440a8f..413c5a6 100644
> --- a/drivers/input/serio/i8042.c
> +++ b/drivers/input/serio/i8042.c
> @@ -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 ***

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86
  2010-05-14 16:10 ` [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86 Matthew Garrett
  2010-05-14 16:15   ` Randy Dunlap
@ 2010-05-14 16:19   ` Linus Torvalds
  2010-05-14 16:31   ` Dmitry Torokhov
  2 siblings, 0 replies; 8+ messages in thread
From: Linus Torvalds @ 2010-05-14 16:19 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-input, dmitry.torokhov, linux-kernel


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

On Fri, 14 May 2010, 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.

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

		Linus

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86
  2010-05-14 16:10 ` [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86 Matthew Garrett
  2010-05-14 16:15   ` Randy Dunlap
  2010-05-14 16:19   ` Linus Torvalds
@ 2010-05-14 16:31   ` Dmitry Torokhov
  2010-05-14 16:36     ` Matthew Garrett
  2 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2010-05-14 16:31 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-input, linux-kernel, torvalds

On Fri, May 14, 2010 at 12:10:03PM -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.
> 

i8042.nopnp would not do?

> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> ---
>  drivers/input/serio/i8042-x86ia64io.h |    5 +++++
>  drivers/input/serio/i8042.c           |    3 +++
>  2 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
> index 6168469..2c5d9c0 100644
> --- a/drivers/input/serio/i8042-x86ia64io.h
> +++ b/drivers/input/serio/i8042-x86ia64io.h
> @@ -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
> diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
> index 6440a8f..413c5a6 100644
> --- a/drivers/input/serio/i8042.c
> +++ b/drivers/input/serio/i8042.c
> @@ -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
> -- 
> 1.7.0.1
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86
  2010-05-14 16:31   ` Dmitry Torokhov
@ 2010-05-14 16:36     ` Matthew Garrett
  2010-05-14 16:42       ` Dmitry Torokhov
  0 siblings, 1 reply; 8+ messages in thread
From: Matthew Garrett @ 2010-05-14 16:36 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, torvalds

On Fri, May 14, 2010 at 09:31:59AM -0700, Dmitry Torokhov wrote:
> On Fri, May 14, 2010 at 12:10:03PM -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.
> > 
> 
> i8042.nopnp would not do?

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

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86
  2010-05-14 16:36     ` Matthew Garrett
@ 2010-05-14 16:42       ` Dmitry Torokhov
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2010-05-14 16:42 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-input, linux-kernel, torvalds

On Fri, May 14, 2010 at 05:36:43PM +0100, Matthew Garrett wrote:
> On Fri, May 14, 2010 at 09:31:59AM -0700, Dmitry Torokhov wrote:
> > On Fri, May 14, 2010 at 12:10:03PM -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.
> > > 
> > 
> > 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".

-- 
Dmitry

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-05-14 16:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-14 16:10 [PATCH 1/3] input: Add some extra PNP keyboard types Matthew Garrett
2010-05-14 16:10 ` [PATCH 2/3] input: Add a PNP entry to the aux device list Matthew Garrett
2010-05-14 16:10 ` [PATCH 3/3] input: Default to only using PNP for i8042 probing on x86 Matthew Garrett
2010-05-14 16:15   ` Randy Dunlap
2010-05-14 16:19   ` Linus Torvalds
2010-05-14 16:31   ` Dmitry Torokhov
2010-05-14 16:36     ` Matthew Garrett
2010-05-14 16:42       ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).