archive mirror
 help / color / mirror / Atom feed
From: "Michał Mirosław" <>
To: Dmitry Torokhov <>,
	Dmitry Osipenko <>,
	Johnny Chuang <>,
	Peter Hutterer <>,
	"Gustavo A. R. Silva" <>
Subject: [PATCH v8 4/4] input: elants: support 0x66 reply opcode for reporting touches
Date: Sat, 24 Oct 2020 14:46:41 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

From: Dmitry Osipenko <>

eKTF3624 touchscreen firmware uses two variants of the reply opcodes for
reporting touch events: one is 0x63 (used by older firmware) and other is
0x66 (used by newer firmware). The 0x66 variant is equal to 0x63 of
eKTH3500, while 0x63 needs small adjustment of the touch pressure value.

Nexus 7 tablet device has eKTF3624 touchscreen and it uses 0x66 opcode for
reporting touch events, let's support it now. Other devices, eg. ASUS TF300T,
use 0x63.

Note: CMD_HEADER_REK is used for replying to calibration requests, it has
the same 0x66 opcode number which eKTF3624 uses for reporting touches.
The calibration replies are handled separately from the the rest of the
commands in the driver by entering into ELAN_WAIT_RECALIBRATION state
and thus this change shouldn't change the old behavior.

Signed-off-by: Dmitry Osipenko <>
Tested-by: Michał Mirosław <>
Signed-off-by: Michał Mirosław <>
 drivers/input/touchscreen/elants_i2c.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
index c24d8cdc4251..1cbda6f20d07 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -61,6 +61,15 @@
 #define QUEUE_HEADER_WAIT	0x64
+ * Depending on firmware version, eKTF3624 touchscreens may utilize one of
+ * these opcodes for the touch events: 0x63 and 0x66. The 0x63 is used by
+ * older firmware version and differs from 0x66 such that touch pressure
+ * value needs to be adjusted. The 0x66 opcode of newer firmware is equal
+ * to 0x63 of eKTH3500.
+ */
+#define QUEUE_HEADER_NORMAL2	0x66
 /* Command header definition */
 #define CMD_HEADER_WRITE	0x54
 #define CMD_HEADER_READ		0x53
@@ -1052,7 +1061,6 @@ static irqreturn_t elants_i2c_irq(int irq, void *_dev)
 		switch (ts->buf[FW_HDR_TYPE]) {
@@ -1072,6 +1080,7 @@ static irqreturn_t elants_i2c_irq(int irq, void *_dev)
 			report_count = ts->buf[FW_HDR_COUNT];
 			if (report_count == 0 || report_count > 3) {

  parent reply	other threads:[~2020-10-24 12:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-24 12:46 [PATCH v8 0/4] input: elants: Support Asus TF300T and Nexus 7 touchscreens Michał Mirosław
2020-10-24 12:46 ` [PATCH v8 1/4] input: elants: document some registers and values Michał Mirosław
2020-10-24 12:46 ` [PATCH v8 2/4] input: elants: support old touch report format Michał Mirosław
2020-10-24 12:46 ` [PATCH v8 3/4] input: elants: read touchscreen size for EKTF3624 Michał Mirosław
2020-10-24 12:46 ` Michał Mirosław [this message]
2020-11-03  3:59 ` [PATCH v8 0/4] input: elants: Support Asus TF300T and Nexus 7 touchscreens Dmitry Osipenko

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v8 4/4] input: elants: support 0x66 reply opcode for reporting touches' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox