linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: JJ Ding <jj_ding@emc.com.tw>
To: linux-input@vger.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	JJ Ding <jj_ding@emc.com.tw>, JJ Ding <dgdunix@gmail.com>
Subject: [RFC PATCH 2/2] Input: elantech - convert v1 ~ v3 hardware to use PSMOUSE_SHIFT_PACKET
Date: Wed,  7 Dec 2011 19:38:44 +0800	[thread overview]
Message-ID: <1323257924-12773-3-git-send-email-jj_ding@emc.com.tw> (raw)
In-Reply-To: <1323257924-12773-1-git-send-email-jj_ding@emc.com.tw>

From: JJ Ding <dgdunix@gmail.com>

This makes the driver resemble the bebavior documented in
Documentation/input/elantech.txt

Signed-off-by: JJ Ding <dgdunix@gmail.com>
---
 drivers/input/mouse/elantech.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index d2c0db1..674cd78 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -728,7 +728,7 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse)
 	switch (etd->hw_version) {
 	case 1:
 		if (etd->paritycheck && !elantech_packet_check_v1(psmouse))
-			return PSMOUSE_BAD_DATA;
+			return PSMOUSE_SHIFT_PACKET;
 
 		elantech_report_absolute_v1(psmouse);
 		break;
@@ -739,7 +739,7 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse)
 			return PSMOUSE_FULL_PACKET;
 
 		if (etd->paritycheck && !elantech_packet_check_v2(psmouse))
-			return PSMOUSE_BAD_DATA;
+			return PSMOUSE_SHIFT_PACKET;
 
 		elantech_report_absolute_v2(psmouse);
 		break;
@@ -751,7 +751,7 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse)
 			return PSMOUSE_FULL_PACKET;
 
 		if (packet_type == PACKET_UNKNOWN)
-			return PSMOUSE_BAD_DATA;
+			return PSMOUSE_SHIFT_PACKET;
 
 		elantech_report_absolute_v3(psmouse, packet_type);
 		break;
-- 
1.7.8


  parent reply	other threads:[~2011-12-07 11:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07 11:38 [RFC PATCH 0/2] Input: psmouse - new mechanism for bad packet handling JJ Ding
2011-12-07 11:38 ` [RFC PATCH 1/2] Input: psmouse - work around EC buffer JJ Ding
2011-12-07 11:38 ` JJ Ding [this message]
2012-01-29 11:11 ` [RFC PATCH 0/2] Input: psmouse - new mechanism for bad packet handling Marc Dietrich

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=1323257924-12773-3-git-send-email-jj_ding@emc.com.tw \
    --to=jj_ding@emc.com.tw \
    --cc=dgdunix@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --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 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).