linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jingle Wu <jingle.wu@emc.com.tw>
To: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
	dmitry.torokhov@gmail.com
Cc: phoenix@emc.com.tw, josh.chen@emc.com.tw, dave.wang@emc.com.tw,
	kai.heng.feng@canonical.com, Jingle Wu <jingle.wu@emc.com.tw>
Subject: [PATCH] Input: elan_i2c - Add ic type 0x15.
Date: Thu, 30 Jul 2020 02:05:26 -0400	[thread overview]
Message-ID: <20200730060526.12439-1-jingle.wu@emc.com.tw> (raw)

The update firmware flow of ic type 0x15 is same with ic type 0x14.

Signed-off-by: Jingle Wu <jingle.wu@emc.com.tw>
---
 drivers/input/mouse/elan_i2c_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c
index 8a0f224da423..c599e21a8478 100644
--- a/drivers/input/mouse/elan_i2c_core.c
+++ b/drivers/input/mouse/elan_i2c_core.c
@@ -138,6 +138,7 @@ static int elan_get_fwinfo(u16 ic_type, u8 iap_version, u16 *validpage_count,
 		*validpage_count = 2048;
 		break;
 	case 0x14:
+	case 0x15:
 		*validpage_count = 1024;
 		break;
 	default:
@@ -151,7 +152,7 @@ static int elan_get_fwinfo(u16 ic_type, u8 iap_version, u16 *validpage_count,
 	*signature_address =
 		(*validpage_count * ETP_FW_PAGE_SIZE) - ETP_FW_SIGNATURE_SIZE;
 
-	if (ic_type == 0x14 && iap_version >= 2) {
+	if ((ic_type == 0x14 || ic_type == 0x15) && iap_version >= 2) {
 		*validpage_count /= 8;
 		*page_size = ETP_FW_PAGE_SIZE_512;
 	} else if (ic_type >= 0x0D && iap_version >= 1) {
-- 
2.17.1


             reply	other threads:[~2020-07-30  6:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30  6:05 Jingle Wu [this message]
2020-07-30  6:31 ` [PATCH] Input: elan_i2c - Add ic type 0x15 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=20200730060526.12439-1-jingle.wu@emc.com.tw \
    --to=jingle.wu@emc.com.tw \
    --cc=dave.wang@emc.com.tw \
    --cc=dmitry.torokhov@gmail.com \
    --cc=josh.chen@emc.com.tw \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phoenix@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).