input: elantech touchpad driver miss-recognising logitech mice
Subsystems (2)
PATCH 19/22 input: elantech touchpad driver miss-recognising logitech mice
From: Arjan Opmeer <[email protected]>
Some Logitech mice react to the magic knock like an Elantech touchpad would. This leads to those mice being misdetected as Elantech touchpads. Add a version query to elantech_detect() to distinguish the two.
---
drivers/input/mouse/elantech.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
drivers/input/mouse/elantech.c renamed from drivers/input/mouse/elantech.c~input-elantech-touchpad-driver-miss-recognising-logitech-mice +16 -3
@@ -567,14 +567,27 @@ int elantech_detect(struct psmouse *psmoreturn -1 ; } -pr_debug ("elantech.c: Elantech version query result 0x%02x, 0x%02x, 0x%02x.\n" , - param[0 ], param[1 ], param[2 ]); -if (param[0 ] ==0 || param[1 ] !=0 ) {pr_debug ("elantech.c: Probably not a real Elantech touchpad. Aborting.\n" );return -1 ; } +/* +* There are Logitech mice that react to the magic knock exactly +* like an Elantech touchpad would, so do a version query here to +* try to distinguish the two +*/ +if (synaptics_send_cmd (psmouse,ETP_FW_VERSION_QUERY , param)) { +pr_err ("elantech.c: failed to query firmware version.\n" ); +return -1 ; + } +pr_info ("elantech.c: Elantech version query result 0x%02x, 0x%02x, 0x%02x.\n" , + param[0 ], param[1 ], param[2 ]); +if (param[0 ] ==0 || param[1 ] !=0 ) { +pr_info ("elantech.c: Probably not a real Elantech touchpad. Aborting.\n" ); +return -1 ; + } +if (set_properties) { psmouse->vendor ="Elantech" ; psmouse->name ="Touchpad" ;
_
Quoted 10 lines · On Wed, 4 Mar 2009 21:24:35 +0100 Arjan Opmeer <[email protected]> wrote:
Quoted 5 lines · On Wed, Mar 04, 2009 at 11:59:09AM -0800, [email protected] wrote:
From: Arjan Opmeer <[email protected]>
Some Logitech mice react to the magic knock like an Elantech touchpad would. This leads to those mice being misdetected as Elantech touchpads. Add a version query to
elantech_detect()to distinguish the two.Andrew, I am confused. To what should this patch apply? Notice the version query result debug print that gets removed and added. The test for a real touchpad that now exists twice.
It appears that the patch already was appiled (woo-hooo!) but it still applied on top of itself. It happens sometimes.
Quoted 5 lines · On Wed, Mar 04, 2009 at 11:59:09AM -0800, [email protected] wrote:
From: Arjan Opmeer <[email protected]>
Some Logitech mice react to the magic knock like an Elantech touchpad would. This leads to those mice being misdetected as Elantech touchpads. Add a version query to
elantech_detect()to distinguish the two.
Andrew, I am confused. To what should this patch apply? Notice the version query result debug print that gets removed and added. The test for a real touchpad that now exists twice.
Quoted 44 lines
Signed-off-by Arjan Opmeer <[email protected]>Cc Andy Whitcroft <[email protected]>Cc Dmitry Torokhov <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
drivers/input/mouse/elantech.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)diff -puN
drivers/input/mouse/elantech.c~input-elantech-touchpad-driver-miss-recognising-logitech-micedrivers/input/mouse/elantech.cdrivers/input/mouse/elantech.c renamed from drivers/input/mouse/elantech.c~input-elantech-touchpad-driver-miss-recognising-logitech-mice +16
-3@@ -567,14 +567,27 @@ int elantech_detect(struct psmouse *psmoreturn -1 ; } -pr_debug ("elantech.c: Elantech version query result 0x%02x, 0x%02x, 0x%02x.\n" , - param[0 ], param[1 ], param[2 ]); -if (param[0 ] ==0 || param[1 ] !=0 ) {pr_debug ("elantech.c: Probably not a real Elantech touchpad. Aborting.\n" );return -1 ; } +/* +* There are Logitech mice that react to the magic knock exactly +* like an Elantech touchpad would, so do a version query here to +* try to distinguish the two +*/ +if (synaptics_send_cmd (psmouse,ETP_FW_VERSION_QUERY , param)) { +pr_err ("elantech.c: failed to query firmware version.\n" ); +return -1 ; + } +pr_info ("elantech.c: Elantech version query result 0x%02x, 0x%02x, 0x%02x.\n" , + param[0 ], param[1 ], param[2 ]); +if (param[0 ] ==0 || param[1 ] !=0 ) { +pr_info ("elantech.c: Probably not a real Elantech touchpad. Aborting.\n" ); +return -1 ; + } +if (set_properties) { psmouse->vendor ="Elantech" ; psmouse->name ="Touchpad" ;_