From: "Richard Schütz" <r.schtz@t-online.de>
To: JJ Ding <jj_ding@emc.com.tw>
Cc: linux-input@vger.kernel.org, Aaron Huang <aaron_huang@emc.com.tw>,
Tom Lin <tom_lin@emc.com.tw>
Subject: Re: elantech touchpad issues
Date: Thu, 08 Sep 2011 20:17:29 +0200 [thread overview]
Message-ID: <4E6906B9.1080205@t-online.de> (raw)
In-Reply-To: <87sjo7oef3.fsf@emc.com.tw>
Am 08.09.2011 06:18, schrieb JJ Ding:
> Hi Richard,
>
> It turns out that v2 hardware has debounce packet, too. But with
> different signature compared to v3. To the best of my knowledge, I can
> only say some models of v2 hardware have this, and others don't. So we
> always check for debounce.
>
> Please test this patch and see if it works for you.
> Please apply this on up of my v5 series.
>
> Thanks
> ---
> diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
> index 38fb155..1e5ea1d 100644
> --- a/drivers/input/mouse/elantech.c
> +++ b/drivers/input/mouse/elantech.c
> @@ -613,6 +613,13 @@ static int elantech_packet_check_v1(struct psmouse *psmouse)
> etd->parity[packet[3]] == p3;
> }
>
> +static int elantech_check_debounce_v2(struct psmouse *psmouse)
> +{
> + const u8 debounce_packet[] = { 0x84, 0xff, 0xff, 0x02, 0xff, 0xff };
> + unsigned char *packet = psmouse->packet;
> + return !memcmp(packet, debounce_packet, sizeof(debounce_packet));
> +}
> +
> static int elantech_packet_check_v2(struct psmouse *psmouse)
> {
> struct elantech_data *etd = psmouse->private;
> @@ -708,6 +715,9 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse)
> break;
>
> case 2:
> + if (elantech_check_debounce_v2(psmouse))
> + return PSMOUSE_FULL_PACKET;
> +
> if (etd->paritycheck&& !elantech_packet_check_v2(psmouse))
> return PSMOUSE_BAD_DATA;
> --
> jj
Yeah, this fixes the annoying issue with multiple fingers.
Now only the problem with the wrong axis ranges is remaining.
--
Regards,
Richard Schütz
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-09-10 14:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-06 14:53 elantech touchpad issues Richard Schütz
2011-09-07 1:46 ` JJ Ding
2011-09-08 4:18 ` JJ Ding
2011-09-08 18:17 ` Richard Schütz [this message]
2011-09-12 8:42 ` Éric Piel
2011-09-12 9:57 ` Richard Schütz
2011-09-13 1:27 ` JJ Ding
-- strict thread matches above, loose matches on Subject: below --
2011-01-23 14:12 Richard Schütz
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=4E6906B9.1080205@t-online.de \
--to=r.schtz@t-online.de \
--cc=aaron_huang@emc.com.tw \
--cc=jj_ding@emc.com.tw \
--cc=linux-input@vger.kernel.org \
--cc=tom_lin@emc.com.tw \
/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;
as well as URLs for NNTP newsgroup(s).