All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Cernekee <cernekee@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: seth.forshee@canonical.com, linux-input@vger.kernel.org
Subject: [PATCH 3/3] Input: ALPS - Detect Pinnacle AGx using EC report instead of E7 report
Date: Sun, 20 Jan 2013 01:31:16 -0800	[thread overview]
Message-ID: <57b6e6cb34a2e5f58a16032fadffc844@localhost> (raw)
In-Reply-To: <10bf6ea5c8f86eca66cd39498ca38d58@localhost>

The E7 report output can be ambiguous for newer touchpads; the
manufacturer's own drivers use the EC report instead, and check a wider
range of IDs than what is in the current table.  Implement similar
behavior in alps.c.

Tested on Dell E6410 (E7 report: 73 02 64; EC report: 88 07 9d)

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
---
 drivers/input/mouse/alps.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 338e97e..21fc8c9 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -109,8 +109,6 @@ static const struct alps_model_info alps_model_data[] = {
 	{ { 0x73, 0x02, 0x50 }, 0x00, ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS },		/* Dell Vostro 1400 */
 	{ { 0x52, 0x01, 0x14 }, 0x00, ALPS_PROTO_V2, 0xff, 0xff,
 		ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED },				/* Toshiba Tecra A11-11L */
-	{ { 0x73, 0x02, 0x64 },	0x9b, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT },
-	{ { 0x73, 0x02, 0x64 },	0x9d, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT },
 	{ { 0x73, 0x02, 0x64 },	0x8a, ALPS_PROTO_V4, 0x8f, 0x8f, 0 },
 };
 
@@ -118,6 +116,10 @@ static const struct alps_model_info alps_model_rushmore = {
 	{ ALPS_RUSHMORE }, 0x00, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT
 };
 
+static const struct alps_model_info alps_model_pinnacle_agx = {
+	{ ALPS_PINAGX }, 0x00, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT
+};
+
 /*
  * XXX - this entry is suspicious. First byte has zero lower nibble,
  * which is what a normal mouse would report. Also, the value 0x0e
@@ -1040,13 +1042,13 @@ static const struct alps_model_info *alps_probe_pinnacle(
 	    (param[1] != 0x07 && param[1] != 0x08))
 		goto out;
 
-	/* For now this code has only been verified to detect Rushmore */
+	/* This code has not been tested with Pinnacle AG or Pinnacle */
 	if (param[1] == 0x08)
 		model = &alps_model_rushmore;
 	else if (param[2] >= 0x80 && param[2] <= 0x8f)
 		psmouse_info(psmouse, "detected Pinnacle AG via EC report\n");
 	else if (param[2] >= 0x90 && param[2] <= 0x9d)
-		psmouse_info(psmouse, "detected Pinnacle AGx via EC report\n");
+		model = &alps_model_pinnacle_agx;
 	else if (param[2] < 0x80)
 		psmouse_info(psmouse, "detected Pinnacle via EC report\n");
 
-- 
1.7.10.4


      parent reply	other threads:[~2013-01-20  9:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-20  9:31 [PATCH 1/3] Input: ALPS - Introduce helper function for repeated commands Kevin Cernekee
2013-01-20  9:31 ` [PATCH 2/3] Input: ALPS - Add code to support "Rushmore" touchpads Kevin Cernekee
2013-01-26 11:53   ` Peter Korsgaard
2013-01-26 18:45     ` Kevin Cernekee
2013-01-26 18:51       ` Peter Korsgaard
2013-01-26 19:09         ` Kevin Cernekee
2013-01-26 19:12           ` Peter Korsgaard
2013-05-06 19:34     ` Peter Korsgaard
2013-01-20  9:31 ` Kevin Cernekee [this message]

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=57b6e6cb34a2e5f58a16032fadffc844@localhost \
    --to=cernekee@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=seth.forshee@canonical.com \
    /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.