From: JJ Ding <jj_ding@emc.com.tw>
To: Seth Forshee <seth.forshee@canonical.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Aaron Huang" <aaron_huang@emc.com.tw>,
"Tom Lin" <tom_lin@emc.com.tw>,
"Éric Piel" <E.A.B.Piel@tudelft.nl>,
"Daniel Kurtz" <djkurtz@chromium.org>,
"Chase Douglas" <chase.douglas@canonical.com>,
"Henrik Rydberg" <rydberg@euromail.se>,
"Alessandro Rubini" <rubini@cvml.unipv.it>
Subject: Re: [PATCH v2 7/7] Input: elantech - add v3 hardware support
Date: Thu, 25 Aug 2011 09:09:02 +0800 [thread overview]
Message-ID: <87mxeynvpt.fsf@emc.com.tw> (raw)
In-Reply-To: <20110824143520.GB23868@thinkpad-t410>
Hi Seth,
Thank you. You are right.
I think I somehow tested the worng touchpad for this patch.
jj
On Wed, 24 Aug 2011 09:35:20 -0500, Seth Forshee <seth.forshee@canonical.com> wrote:
> On Wed, Aug 24, 2011 at 01:44:46PM +0800, JJ Ding wrote:
> > @@ -403,11 +503,39 @@ static int elantech_packet_check_v2(struct psmouse *psmouse)
> > }
> >
> > /*
> > + * We check the constant bits to determine what packet type we get,
> > + * so packet checking is mandatory for v3 hardware.
> > + */
> > +static int elantech_packet_check_v3(struct psmouse *psmouse)
> > +{
> > + unsigned char *packet = psmouse->packet;
> > +
> > + if ((packet[0] & 0x0c) == 0x04 &&
> > + (packet[3] & 0xcf) == 0x02)
> > + return PACKET_V3_HEAD;
> > +
> > + if ((packet[0] & 0x0c) == 0x0c &&
> > + (packet[3] & 0xce) == 0x0c)
> > + return PACKET_V3_TAIL;
> > +
> > + if (packet[0] == 0xc4 &&
> > + packet[1] == 0xff &&
> > + packet[2] == 0xff &&
> > + packet[3] == 0x02 &&
> > + packet[4] == 0xff &&
> > + packet[5] == 0xff)
> > + return PACKET_DEBOUNCE;
> > +
> > + return PACKET_UNKNOWN;
> > +}
>
> This will never return PACKET_DEBOUNCE, because those packets will have
> already matched the conditions for PACKET_V3_HEAD. That condition needs
> to be moved to the top of the function.
>
> Seth
next prev parent reply other threads:[~2011-08-25 1:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 5:44 [PATCH v2 0/7] Input: elantech: add support for newer hardware JJ Ding
2011-08-24 5:44 ` [PATCH v2 1/7] Input: elantech - correct x, y value range for v2 hardware JJ Ding
2011-08-24 5:44 ` [PATCH v2 2/7] Input: elantech - get rid of ETP_2FT_* in elantech.h JJ Ding
2011-08-24 5:44 ` [PATCH v2 3/7] Input: elantech - use firmware provided x, y ranges JJ Ding
2011-08-24 5:44 ` [PATCH v2 4/7] Input: elantech - remove ETP_EDGE_FUZZ_V2 JJ Ding
2011-08-24 5:44 ` [PATCH v2 5/7] Input: elantech - packet checking for v2 hardware JJ Ding
2011-08-24 5:44 ` [PATCH v2 6/7] Input: elantech - clean up elantech_init JJ Ding
2011-08-24 5:44 ` [PATCH v2 7/7] Input: elantech - add v3 hardware support JJ Ding
2011-08-24 14:35 ` Seth Forshee
2011-08-25 1:09 ` JJ Ding [this message]
2011-08-25 7:06 ` Dmitry Torokhov
2011-08-25 8:22 ` JJ Ding
-- strict thread matches above, loose matches on Subject: below --
2011-08-24 5:38 [PATCH v2 0/7] Input: elantech: add support for newer hardware JJ Ding
2011-08-24 5:38 ` [PATCH v2 7/7] Input: elantech - add v3 hardware support JJ Ding
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=87mxeynvpt.fsf@emc.com.tw \
--to=jj_ding@emc.com.tw \
--cc=E.A.B.Piel@tudelft.nl \
--cc=aaron_huang@emc.com.tw \
--cc=chase.douglas@canonical.com \
--cc=djkurtz@chromium.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rubini@cvml.unipv.it \
--cc=rydberg@euromail.se \
--cc=seth.forshee@canonical.com \
--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