All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arjan Opmeer <arjan@opmeer.net>
To: akpm@linux-foundation.org
Cc: dtor@mail.ru, linux-input@vger.kernel.org, apw@shadowen.org
Subject: Re: [patch 19/22] input: elantech touchpad driver miss-recognising logitech mice
Date: Wed, 4 Mar 2009 21:24:35 +0100	[thread overview]
Message-ID: <20090304202435.GA16259@adopmeer.homeip.net> (raw)
In-Reply-To: <200903041959.n24Jx9cY028481@imap1.linux-foundation.org>


On Wed, Mar 04, 2009 at 11:59:09AM -0800, akpm@linux-foundation.org wrote:
> From: Arjan Opmeer <arjan@opmeer.net>
> 
> 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.

> Signed-off-by: Arjan Opmeer <arjan@opmeer.net>
> Cc: Andy Whitcroft <apw@shadowen.org>
> Cc: Dmitry Torokhov <dtor@mail.ru>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  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-mice drivers/input/mouse/elantech.c
> --- a/drivers/input/mouse/elantech.c~input-elantech-touchpad-driver-miss-recognising-logitech-mice
> +++ a/drivers/input/mouse/elantech.c
> @@ -567,14 +567,27 @@ int elantech_detect(struct psmouse *psmo
>  		return -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";
> _

  reply	other threads:[~2009-03-04 20:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-04 19:59 [patch 19/22] input: elantech touchpad driver miss-recognising logitech mice akpm
2009-03-04 20:24 ` Arjan Opmeer [this message]
2009-03-04 20:39   ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090304202435.GA16259@adopmeer.homeip.net \
    --to=arjan@opmeer.net \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=dtor@mail.ru \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.