public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alexander E. Patrakov" <patrakov@gmail.com>
To: Arjan Opmeer <arjan@opmeer.net>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: 2.6.28 thinks that my PS/2 mouse is a touchpad
Date: Tue, 30 Dec 2008 11:03:35 +0500	[thread overview]
Message-ID: <4959B9B7.2050800@gmail.com> (raw)
In-Reply-To: <20081229185619.GA18394@adopmeer.homeip.net>

Arjan Opmeer wrote:
> On Sat, Dec 27, 2008 at 02:06:29PM +0500, Alexander E. Patrakov wrote:
>> elantech.c: Elantech version query result 0x00, 0x01, 0x64.
>> elantech.c: assuming hardware version 1, firmware version 0.100
>> elantech.c: Synaptics capabilities query result 0x00, 0x02, 0x64.
> 
> However, all version query results I have seen from Elantech touchpads have
> a non-zero first byte and a zero second byte. So we could test for that to
> prevent this mouse from being detected as a touchpad.
> 
> Dmitry, do you think something like this is sufficient?
> 
> --- elantech.c.ORIG	2008-12-29 19:35:01.000000000 +0100
> +++ elantech.c.NEW	2008-12-29 19:38:59.000000000 +0100
> @@ -618,6 +618,10 @@ int elantech_init(struct psmouse *psmous
>  	}
>  	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");
> +		goto init_fail;
> +	}
>  	etd->fw_version_maj = param[0];
>  	etd->fw_version_min = param[2];

This is still slightly wrong. The mouse does work, but is misnamed in 
the dmesg output and in /proc/bus/input/devices:

psmouse serio1: ID: 10 00 64<6>elantech.c: Elantech version query result 
0x00, 0x01, 0x64.
elantech.c: Probably not a real Elantech touchpad. Aborting.
input: ImExPS/2 Elantech Touchpad as /class/input/input8

I: Bus=0011 Vendor=0002 Product=0006 Version=0000
N: Name="ImExPS/2 Elantech Touchpad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/class/input/input8
U: Uniq=
H: Handlers=mouse1 event6
B: EV=7
B: KEY=1f0000 0 0 0 0 0 0 0 0
B: REL=143

-- 
Alexander E. Patrakov

  reply	other threads:[~2008-12-30  6:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-27  9:06 2.6.28 thinks that my PS/2 mouse is a touchpad Alexander E. Patrakov
2008-12-28  6:21 ` Andrew Morton
2008-12-29 18:56 ` Arjan Opmeer
2008-12-30  6:03   ` Alexander E. Patrakov [this message]
2008-12-30  9:15     ` Dmitry Torokhov
2008-12-30 14:29       ` Arjan Opmeer
2009-01-02  0:07   ` Denys Vlasenko
2009-01-02 18:37     ` Arjan Opmeer

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=4959B9B7.2050800@gmail.com \
    --to=patrakov@gmail.com \
    --cc=arjan@opmeer.net \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox