From patchwork Wed Sep 7 05:52:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunlong Jia X-Patchwork-Id: 12968458 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25785C38145 for ; Wed, 7 Sep 2022 05:52:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229814AbiIGFw2 (ORCPT ); Wed, 7 Sep 2022 01:52:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbiIGFw1 (ORCPT ); Wed, 7 Sep 2022 01:52:27 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F91D52DDA for ; Tue, 6 Sep 2022 22:52:26 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id n65-20020a17090a5ac700b001fbb4fad865so13664116pji.1 for ; Tue, 06 Sep 2022 22:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ecs-corp-partner-google-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=bvTlivoQ5nSfF+84cpi2CPQhnbe+HsBBNxx0q5XLX00=; b=Q/KLNCRA2xa8jICb0syTNT70zAyV4GYgAbKjXw7aOOASeUAPJL8QSxe5J1J1TUSuZM HOjQUg1WsftqprdKQllNd5uXqA0TqOWuoGvayz0wEEmthXDOaqkX+R8VzQlt424NI+1f 58ZawkQe6GGxrJlT/Ur5OYYBM9cAj4OUyb/m0fiQxCjTm/CCWoqyEtoIEwnzrgWq/VDe ikuP/jg/zv5yY42iejBh82tp+eP5tURoXL4RRLKriglpZfNNOE/5HtCb2WmP22tDajre YWUsotGlWrj4u2vdxPqCGWjkScrZHYn+WLG2tyqfH+NgDTz69eCGGJA+QuaFQMNIPdIy hc5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=bvTlivoQ5nSfF+84cpi2CPQhnbe+HsBBNxx0q5XLX00=; b=QrP/17kYSaLQ3/qslursjAkF5LNq1FPJAgst1qH4mqvzRU//FZnf4QrLVZ4kjeu8L5 mGFZtAYjO+ejJjuxpUS3WwGFpjmvSQDl8wqBmsd6IxnnsbEDCYRaq+Tnhl21tnJGje+g EK1o6uORi+dqViVwmP8LQ0A6UsitFy2m94tg3wvur6VV2aLrVhD6UAb+DnswkKRRJXY9 48qcUUDIcnqj44dFHsSkCw4VNdXo/i7AUNiGTCkV9jIYKbExEsaCi8u/63PB258BqbN+ thWaPrOpNyr/CY1hersUy/5hjHe3lJ88SVMELoMREDLPzVlb9xib+gnaS/03p6tYugn9 w74A== X-Gm-Message-State: ACgBeo1ppZKFPJDBNbJAcU0Ws5ez6bMTvq8s1Luy8A93AhcGKct8suId R3AGG4+2YWnuEFhMmNuUsT4eng== X-Google-Smtp-Source: AA6agR6Fq1L+4wbXgW5BJVytbMb2uao4jrmnWUce3Pk6gF//IFaE2wNpEeaS8T6JZcR/lQBK8ti6jg== X-Received: by 2002:a17:90a:5d88:b0:1fa:b5c4:608b with SMTP id t8-20020a17090a5d8800b001fab5c4608bmr28508282pji.22.1662529945944; Tue, 06 Sep 2022 22:52:25 -0700 (PDT) Received: from localhost.localdomain ([103.104.171.43]) by smtp.gmail.com with ESMTPSA id d6-20020a170902654600b00172dc6e1916sm6168094pln.220.2022.09.06.22.52.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 22:52:25 -0700 (PDT) From: Yunlong Jia To: LKML Cc: Douglas Anderson , Bob Moragues , Yunlong Jia , Henry Sun , Yunlong Jia , David Heidelberg , Dmitry Torokhov , Rob Herring , devicetree@vger.kernel.org, linux-input@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: input: touchscreen: elants_i2c: Add eth3915n touchscreen chip Date: Wed, 7 Sep 2022 05:52:03 +0000 Message-Id: <20220907054805.v2.1.I1168feec10de16e0f130dfe72ce7976762597dba@changeid> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Add an elan touch screen chip eth3915n. This chip requires more delay time than the eth3500. Signed-off-by: Yunlong Jia Reviewed-by: Douglas Anderson Acked-by: David Heidelberg --- (no changes since v1) .../devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml b/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml index a9b53c2e6f0ab..d28625372f5ac 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml +++ b/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml @@ -17,6 +17,7 @@ properties: enum: - elan,ektf3624 - elan,ekth3500 + - elan,ekth3915 reg: maxItems: 1 From patchwork Wed Sep 7 05:52:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunlong Jia X-Patchwork-Id: 12968459 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FAC8ECAAD3 for ; Wed, 7 Sep 2022 05:52:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229850AbiIGFwk (ORCPT ); Wed, 7 Sep 2022 01:52:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229829AbiIGFwi (ORCPT ); Wed, 7 Sep 2022 01:52:38 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29603883F7 for ; Tue, 6 Sep 2022 22:52:32 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id c198so3697794pfc.13 for ; Tue, 06 Sep 2022 22:52:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ecs-corp-partner-google-com.20210112.gappssmtp.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date; bh=JFk6Wy6/dMaKMuY8o7j06cewyOb+0XexmdFM4uw0rXA=; b=HjIL4ef7mowqU62OfWZrSCwqEpM5S75JQqwiHvyaejZxlqxz4uXb6mW5XJuHqk043a 9XeW+8KToe6qaTO8d3n8+yOz3W+mMkkK+kgqTTn3Sbt42SNUx/deXNkqxpOo2tpV/HMD CMC8ZCVbtDMFEbOzXhpF0wrW4ekwwvLvNt7T+6jyV+R62kPbIw0/xfswwobrcz2jotpd fZ4khXwffRkooIl2ob6yCall5UrOnIUdYcAPnN1fJZukYkuirOcztjYCx1a1uBctcusP e2nIpyWnAycOj2w9hBWS3A+Q6+VvmCJxiAN+IeFIxckRlh39p3jDnwWeE+U/RKljBSPQ hNiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date; bh=JFk6Wy6/dMaKMuY8o7j06cewyOb+0XexmdFM4uw0rXA=; b=JT0aGWAblK+zKmDKQZoqMcRxemtF5GJxzsmrq3M92tm8jbcOGdFVjCZS94Qn1j4BJi 7MycclwA44tmtSPfnU/DlZ0nWJubBXrIo7BV0HGDBwZioNFP4GUhZgWl+vdse4vBTfIX jT8cd9Yu6ArPH97ACOjN4sk8WxvK7GdCAu+eSM7W4N2ToPP5IIkBX9nhDEFZ7dXITnze jbR175mejYIHUHByy1pTjHYR1XxkWkJxk3UimB8LNjk698t15fFocA2i9yAYfLYCsA4N vIZCJF8WAygmXjEV+KNCi0rAtxv9g5mXGP3ySYjtrBe97axSKXf84LkG2uIdotmFi8aj pQNA== X-Gm-Message-State: ACgBeo1DSr/41Thc8WXt4kCIi2vFRLbiztkS7qcS3OzQHPaSd6uJ3KST K4IhbUkomJqiyLTsQKPkYTc12A== X-Google-Smtp-Source: AA6agR77t5rxjeuUTD8QAqc8sAxs5M3rLjd+1dfwed5GqOwnJcyVIY85AF1H9rj8mKhNGYSYlqOd5A== X-Received: by 2002:a63:106:0:b0:430:805a:f1ad with SMTP id 6-20020a630106000000b00430805af1admr1982367pgb.284.1662529951192; Tue, 06 Sep 2022 22:52:31 -0700 (PDT) Received: from localhost.localdomain ([103.104.171.43]) by smtp.gmail.com with ESMTPSA id d6-20020a170902654600b00172dc6e1916sm6168094pln.220.2022.09.06.22.52.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 22:52:30 -0700 (PDT) From: Yunlong Jia To: LKML Cc: Douglas Anderson , Bob Moragues , Yunlong Jia , Henry Sun , Yunlong Jia , Dmitry Torokhov , Guenter Roeck , Johnny Chuang , linux-input@vger.kernel.org Subject: [PATCH v2 2/2] input: touchscreen: elants_i2c: Add eth3915n touchscreen chip Date: Wed, 7 Sep 2022 05:52:04 +0000 Message-Id: <20220907054805.v2.2.Ib278031fb2e3f4eafdfd8297b9d41031a2e080e0@changeid> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220907054805.v2.1.I1168feec10de16e0f130dfe72ce7976762597dba@changeid> References: <20220907054805.v2.1.I1168feec10de16e0f130dfe72ce7976762597dba@changeid> Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The eth3915n requires more delay time than the eth3500 when reset. Define EKTH3915_RESET_DELAY_MSEC as the reset delay time of eth3915n, about 300ms. Signed-off-by: Yunlong Jia Reviewed-by: Douglas Anderson --- (no changes since v1) drivers/input/touchscreen/elants_i2c.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index c9dd703b0c7d8..60ddb58281bdf 100644 --- a/drivers/input/touchscreen/elants_i2c.c +++ b/drivers/input/touchscreen/elants_i2c.c @@ -116,6 +116,7 @@ #define ELAN_POWERON_DELAY_USEC 500 #define ELAN_RESET_DELAY_MSEC 20 +#define EKTH3915_RESET_DELAY_MSEC 300 /* FW boot code version */ #define BC_VER_H_BYTE_FOR_EKTH3900x1_I2C 0x72 @@ -133,6 +134,7 @@ enum elants_chip_id { EKTH3500, EKTF3624, + EKTH3915, }; enum elants_state { @@ -664,6 +666,7 @@ static int elants_i2c_initialize(struct elants_data *ts) switch (ts->chip_id) { case EKTH3500: + case EKTH3915: if (!error) error = elants_i2c_query_ts_info_ekth(ts); break; @@ -1361,7 +1364,17 @@ static int elants_i2c_power_on(struct elants_data *ts) if (error) return error; - msleep(ELAN_RESET_DELAY_MSEC); + if (ts->chip_id == EKTH3915) + /* + * There need delay 300ms for power on sequence. + * T1 + T2 + T3 >= 305 ms + * T1: 05ms + * T3: >300ms + */ + msleep(EKTH3915_RESET_DELAY_MSEC); + else + msleep(ELAN_RESET_DELAY_MSEC); return 0; } @@ -1686,6 +1699,7 @@ static const struct i2c_device_id elants_i2c_id[] = { { DEVICE_NAME, EKTH3500 }, { "ekth3500", EKTH3500 }, { "ektf3624", EKTF3624 }, + { "ekth3915", EKTH3915 }, { } }; MODULE_DEVICE_TABLE(i2c, elants_i2c_id); @@ -1702,6 +1716,7 @@ MODULE_DEVICE_TABLE(acpi, elants_acpi_id); static const struct of_device_id elants_of_match[] = { { .compatible = "elan,ekth3500", .data = (void *)EKTH3500 }, { .compatible = "elan,ektf3624", .data = (void *)EKTF3624 }, + { .compatible = "elan,ekth3915", .data = (void *)EKTH3915 }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, elants_of_match);