ALPS touchpad detection fix
PATCH 1/1 ALPS touchpad detection fix
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.
---
linux-petero/drivers/input/mouse/psmouse-base.c | 1 + 1 files changed, 1 insertion(+)
drivers/input/mouse/psmouse-base.c renamed from drivers/input/mouse/psmouse-base.c~alps-fix +1 -0
@@ -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 ;
_
Signature · 2 lines
Peter Osterlund - [email protected] http://web.telia.com/~u89404340
Quoted 17 lines · Peter Osterlund
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 <[email protected]>---
linux-petero/drivers/input/mouse/psmouse-base.c | 1 + 1 files changed, 1 insertion(+)diff -puN
drivers/input/mouse/psmouse-base.c~alps-fixdrivers/input/mouse/psmouse-base.c
drivers/input/mouse/psmouse-base.c static int psmouse_extensions(struct psm · line 457
Quoted 7 lines
drivers/input/mouse/psmouse-base.c renamed from drivers/input/mouse/psmouse-base.c~alps-fix +1
-0@@ -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
Quoted 8 lines · Denis Vlasenko
Quoted 7 lines · Peter Osterlund
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.
...
Quoted 10 lines
Review
Quoted 7 lines
/*
* Try ALPS TouchPad
*/(quoted diff) +1
-0+ 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_IMEXand thereforealps_detectwon'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.
---
linux-petero/drivers/input/mouse/psmouse-base.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
drivers/input/mouse/psmouse-base.c renamed from drivers/input/mouse/psmouse-base.c~alps-fix +7 -5
@@ -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 )
_
Signature · 2 lines
Peter Osterlund - [email protected] http://web.telia.com/~u89404340