linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALPS touchpad detection fix
@ 2005-01-06 16:54 Peter Osterlund
  2005-01-07 17:28 ` Denis Vlasenko
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Osterlund @ 2005-01-06 16:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dmitry Torokhov, Vojtech Pavlik, Andrew Morton

My ALPS touchpad is not recognized because the device gets confused by
the Kensington ThinkingMouse probe.  It responds with "00 00 14"
instead of the expected "00 00 64" to the "E6 report".

Resetting the device before attempting the ALPS probe fixes the
problem.

Signed-off-by: Peter Osterlund <petero2@telia.com>
---

 linux-petero/drivers/input/mouse/psmouse-base.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN drivers/input/mouse/psmouse-base.c~alps-fix drivers/input/mouse/psmouse-base.c
--- linux/drivers/input/mouse/psmouse-base.c~alps-fix	2005-01-06 17:33:15.000000000 +0100
+++ linux-petero/drivers/input/mouse/psmouse-base.c	2005-01-06 17:33:46.000000000 +0100
@@ -451,6 +451,7 @@ static int psmouse_extensions(struct psm
 /*
  * Try ALPS TouchPad
  */
+	ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS);
 	if (max_proto > PSMOUSE_IMEX && alps_detect(psmouse, set_properties) == 0) {
 		if (!set_properties || alps_init(psmouse) == 0)
 			return PSMOUSE_ALPS;
_

-- 
Peter Osterlund - petero2@telia.com
http://web.telia.com/~u89404340

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

* Re: [PATCH] ALPS touchpad detection fix
  2005-01-06 16:54 [PATCH] ALPS touchpad detection fix Peter Osterlund
@ 2005-01-07 17:28 ` Denis Vlasenko
  2005-01-07 22:17   ` Peter Osterlund
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Vlasenko @ 2005-01-07 17:28 UTC (permalink / raw)
  To: Peter Osterlund, linux-kernel
  Cc: Dmitry Torokhov, Vojtech Pavlik, Andrew Morton

On Thursday 06 January 2005 18:54, Peter Osterlund wrote:
> My ALPS touchpad is not recognized because the device gets confused by
> the Kensington ThinkingMouse probe.  It responds with "00 00 14"
> instead of the expected "00 00 64" to the "E6 report".
> 
> Resetting the device before attempting the ALPS probe fixes the
> problem.
> 
> Signed-off-by: Peter Osterlund <petero2@telia.com>
> ---
> 
>  linux-petero/drivers/input/mouse/psmouse-base.c |    1 +
>  1 files changed, 1 insertion(+)
> 
> diff -puN drivers/input/mouse/psmouse-base.c~alps-fix drivers/input/mouse/psmouse-base.c
> --- linux/drivers/input/mouse/psmouse-base.c~alps-fix	2005-01-06 17:33:15.000000000 +0100
> +++ linux-petero/drivers/input/mouse/psmouse-base.c	2005-01-06 17:33:46.000000000 +0100
> @@ -451,6 +451,7 @@ static int psmouse_extensions(struct psm
>  /*
>   * Try ALPS TouchPad
>   */
> +	ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS);
>  	if (max_proto > PSMOUSE_IMEX && alps_detect(psmouse, set_properties) == 0) {
>  		if (!set_properties || alps_init(psmouse) == 0)
>  			return PSMOUSE_ALPS;

You do reset even if max_proto <= PSMOUSE_IMEX and therefore
alps_detect won't be called. Is it intended?
--
vda


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

* Re: [PATCH] ALPS touchpad detection fix
  2005-01-07 17:28 ` Denis Vlasenko
@ 2005-01-07 22:17   ` Peter Osterlund
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Osterlund @ 2005-01-07 22:17 UTC (permalink / raw)
  To: Denis Vlasenko
  Cc: linux-kernel, Dmitry Torokhov, Vojtech Pavlik, Andrew Morton

Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua> writes:

> On Thursday 06 January 2005 18:54, Peter Osterlund wrote:
> > My ALPS touchpad is not recognized because the device gets confused by
> > the Kensington ThinkingMouse probe.  It responds with "00 00 14"
> > instead of the expected "00 00 64" to the "E6 report".
> > 
> > Resetting the device before attempting the ALPS probe fixes the
> > problem.
> > 
...
> >  /*
> >   * Try ALPS TouchPad
> >   */
> > +	ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS);
> >  	if (max_proto > PSMOUSE_IMEX && alps_detect(psmouse, set_properties) == 0) {
> >  		if (!set_properties || alps_init(psmouse) == 0)
> >  			return PSMOUSE_ALPS;
> 
> You do reset even if max_proto <= PSMOUSE_IMEX and therefore
> alps_detect won't be called. Is it intended?

Not really intended. (It shouldn't harm though because the
mouse/touchpad is reset anyway before the IntelliMouse probe.)

Here is an updated patch that only does the reset when alps_detect()
is going to be called.

Signed-off-by: Peter Osterlund <petero2@telia.com>
---

 linux-petero/drivers/input/mouse/psmouse-base.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff -puN drivers/input/mouse/psmouse-base.c~alps-fix drivers/input/mouse/psmouse-base.c
--- linux/drivers/input/mouse/psmouse-base.c~alps-fix	2005-01-06 22:43:28.000000000 +0100
+++ linux-petero/drivers/input/mouse/psmouse-base.c	2005-01-07 22:51:45.000000000 +0100
@@ -451,14 +451,16 @@ static int psmouse_extensions(struct psm
 /*
  * Try ALPS TouchPad
  */
-	if (max_proto > PSMOUSE_IMEX && alps_detect(psmouse, set_properties) == 0) {
-		if (!set_properties || alps_init(psmouse) == 0)
-			return PSMOUSE_ALPS;
-
+	if (max_proto > PSMOUSE_IMEX) {
+		ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS);
+		if (alps_detect(psmouse, set_properties) == 0) {
+			if (!set_properties || alps_init(psmouse) == 0)
+				return PSMOUSE_ALPS;
 /*
  * Init failed, try basic relative protocols
  */
-		max_proto = PSMOUSE_IMEX;
+			max_proto = PSMOUSE_IMEX;
+		}
 	}
 
 	if (max_proto > PSMOUSE_IMEX && genius_detect(psmouse, set_properties) == 0)
_

-- 
Peter Osterlund - petero2@telia.com
http://web.telia.com/~u89404340

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

end of thread, other threads:[~2005-01-07 22:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-06 16:54 [PATCH] ALPS touchpad detection fix Peter Osterlund
2005-01-07 17:28 ` Denis Vlasenko
2005-01-07 22:17   ` Peter Osterlund

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).