mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matjaz Hegedic <matjaz.hegedic@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Matjaz Hegedic <matjaz.hegedic@gmail.com>
Subject: [PATCH] Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fw
Date: Sun,  5 Mar 2017 03:13:02 +0100	[thread overview]
Message-ID: <1488679982-9825-1-git-send-email-matjaz.hegedic@gmail.com> (raw)

EeeBook X205TA is yet another ASUS device with a special touchpad
firmware that needs to be accounted for during initialization, or
else the touchpad will go into an invalid state upon suspend/resume.
Adding the appropriate ic_type and product_id check fixes the problem.

Signed-off-by: Matjaz Hegedic <matjaz.hegedic@gmail.com>
---
 drivers/input/mouse/elan_i2c_core.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c
index 2c7d287..dde3ad7 100644
--- a/drivers/input/mouse/elan_i2c_core.c
+++ b/drivers/input/mouse/elan_i2c_core.c
@@ -218,17 +218,19 @@ static int elan_query_product(struct elan_tp_data *data)
 
 static int elan_check_ASUS_special_fw(struct elan_tp_data *data)
 {
-	if (data->ic_type != 0x0E)
-		return false;
-
-	switch (data->product_id) {
-	case 0x05 ... 0x07:
-	case 0x09:
-	case 0x13:
-		return true;
-	default:
-		return false;
+	if (data->ic_type == 0x0E) {
+		switch (data->product_id) {
+		case 0x05 ... 0x07:
+		case 0x09:
+		case 0x13:
+			return true;
+		}
 	}
+	/* ASUS EeeBook X205TA */
+	else if (data->ic_type == 0x8 && data->product_id == 0x26)
+		return true;
+
+	return false;
 }
 
 static int __elan_initialize(struct elan_tp_data *data)
-- 
2.7.4

             reply	other threads:[~2017-03-05  2:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-05  2:13 Matjaz Hegedic [this message]
2017-03-06 19:54 ` Dmitry Torokhov
2017-03-07  7:05   ` 廖崇榮
2017-03-07 10:51     ` Matjaž Hegedič
2017-03-08  6:30       ` 廖崇榮
2017-03-10 22:36         ` 'Dmitry Torokhov'

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=1488679982-9825-1-git-send-email-matjaz.hegedic@gmail.com \
    --to=matjaz.hegedic@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --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

all inboxes | Powered by JetHome®