From patchwork Fri Sep 2 08:32:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunlong Jia X-Patchwork-Id: 12963831 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 F3850C6FA83 for ; Fri, 2 Sep 2022 08:33:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235137AbiIBIdy (ORCPT ); Fri, 2 Sep 2022 04:33:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235809AbiIBIcy (ORCPT ); Fri, 2 Sep 2022 04:32:54 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF392C22AB for ; Fri, 2 Sep 2022 01:32:49 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id f24so1218360plr.1 for ; Fri, 02 Sep 2022 01:32:49 -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=ADcRCN6HxvIz/AomINVN7gpsax0NelSRlaJK22KDq2w=; b=aAVBhBHfBjyk9XBShM5bw5PrkgJRcbYSV0mo1bswoEJVF83A9WqOUi8pixMrwURJXh tnxmBzDEO+JllxEaBtCk4vHG6fXnjxt/3rjcGF2LOAorAGX11Dz3EWzwnwGSTR/RP5i/ wkI8JIP7HChFVHQ4nv1Aw8rMor+Wx9N4ZgVZRUBQSuS43a141wnmbFBChIk4N6nyELtO or/KsIb77t2OIlqhJbOoFz63e53eiCX2Rue3/YY7axt9TqRPYpHZnc0ysoSZd5sezHXp OTIhP+zwj/IV5MbPuu5c6cSumcekBPfCQoa78PuVs3S4rLfl5fBE6TKt1wJ3752lXcH9 YDcw== 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=ADcRCN6HxvIz/AomINVN7gpsax0NelSRlaJK22KDq2w=; b=oZMQczCd87ZKjGEFi0JKxg3nJSo/JL5l02cApotPOhQ4zIy23naU/CFNIMhd8vzekw i019iXOCC8cSu0sm21YBu354/PoMrGHUXOG7LYSZ+VjTRB7IhXpR9tVZo24VCCe8P5mK ICuXHB6eMhsIEuvDOL9R2m+NnIAHDi6003hT3gStbxv4Joqa8LvQuVCF+Sv21c8F4u2y lU56XUQBubVPxeuWsgK/VQk+9XVA6Y4RCrG2xNWi/npEVYukR6R17/eUYgwH3jXhnLaT kAgxG7ZceB58E273Bh9tequtEHUXioPzW4pBGobAIXV5ypCCSZn1oI7V0D4kEkutQBOb n62Q== X-Gm-Message-State: ACgBeo0hpu2Z8mIehR3ng18Dx9faArefDdRdC/NEWeaQAexG9DFaZpiw U9aD8X2gLr3o3pTFRlucIn9bOw== X-Google-Smtp-Source: AA6agR5retUNQRmOiPo/EqbD/vxlo05gsPIOvaXIujVYseKYa/IT1g5UnjlU2I7Ps/JbH+NQNCPCtw== X-Received: by 2002:a17:90b:1803:b0:1fb:45e2:5d85 with SMTP id lw3-20020a17090b180300b001fb45e25d85mr3681298pjb.163.1662107568149; Fri, 02 Sep 2022 01:32:48 -0700 (PDT) Received: from localhost.localdomain ([103.150.184.130]) by smtp.gmail.com with ESMTPSA id y5-20020aa79ae5000000b00537aa0fbb57sm1071241pfp.51.2022.09.02.01.32.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Sep 2022 01:32:47 -0700 (PDT) From: Yunlong Jia To: LKML Cc: Bob Moragues , Douglas Anderson , Henry Sun , Yunlong Jia , David Heidelberg , Dmitry Torokhov , Rob Herring , devicetree@vger.kernel.org, linux-input@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: input: touchscreen: elants_i2c: Add eth3915n touchscreen chip Date: Fri, 2 Sep 2022 08:32:35 +0000 Message-Id: <20220902082843.1.I7da6ff6c8e8700624d61e51ff7d09e151bd83dcb@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 --- .../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 Fri Sep 2 08:32:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunlong Jia X-Patchwork-Id: 12963832 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 C4EC0C54EE9 for ; Fri, 2 Sep 2022 08:33:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235831AbiIBId4 (ORCPT ); Fri, 2 Sep 2022 04:33:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235878AbiIBIdi (ORCPT ); Fri, 2 Sep 2022 04:33:38 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FAD3C2EA1 for ; Fri, 2 Sep 2022 01:33:01 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id 76so1228081pfy.3 for ; Fri, 02 Sep 2022 01:33:01 -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=AFGFaiPRdQ5SJ/dGxKMul5/KeG6XE7MZVomLSXeFr1o=; b=GfbpGSxiB5z4h6mofdFRD7IhSNN6H/kvkScfjjzVuU4kCHtB03x2/YG5ajOP1ham9p N/5Z/EXGSrrSjvBPNR3/UA4QXt4fnngNhBQNRqva5cNB95+Rlq4nNP8jfl73HFJ4uvsG DupdV6DgVxBw4li6whuOWiZVv3LeHw1LvDxnpw8Zrc9YuXEgfn9mZvEJN5278TxGyGEu aKgN8j1PaqSQd4JwabizbxNfJtVKGabNLlwXxa63Ed0Rm3CrKY3+bdW1dPm/kScJvp3x 21OpcIGrABd2csoPPdV6VMWCSfC2VkDUKpVPhaQBWmS3AmoC825GxEYw+8+KWa3GG2qF OU1Q== 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=AFGFaiPRdQ5SJ/dGxKMul5/KeG6XE7MZVomLSXeFr1o=; b=Dr7FrIdPfoK/6ImEfPVOm1FlnJWtW8F5CDz6qdsySb2Wm/i5ovW67SaVa9+T5HbK51 mzlhexhBqWmp2bWHecVKQp96K2Mt45uhMNpCEJYGK6PE/uRJFXZBvApxVSLf/s01vo1Z AtHN8ovnRDGQQzX0ojRXrxsji39WWOStnVM1mW6feE6aZTb+sE95foh256mbySjD29AQ cysVj0bR2MjXehkPjBVZVflMeeh5rnw7mmL0EAZg6rpKUfrCNhPm8y7/4hrMojp6ef9F pWODw1WPez1hFqdwJubaarbc1uu+uwct3asbBsswEekzzkSr7uLCM7l/RS/oa8Jjzrqr okxQ== X-Gm-Message-State: ACgBeo0m2TCrncv3fqW3Htw3AnrarnGNDpCekyQsGkaegnkIfmP3FSr2 wmsHK1nOrMjvKYNNHawimoiXAA== X-Google-Smtp-Source: AA6agR7etKrfZqJZVfF3ephgmYjuNlp2VAVz0/N2qRZ861Z24fg6011vq8s7b9vtZmcOnjD7fZsVvw== X-Received: by 2002:a05:6a00:124d:b0:538:148b:b989 with SMTP id u13-20020a056a00124d00b00538148bb989mr26873058pfi.82.1662107580322; Fri, 02 Sep 2022 01:33:00 -0700 (PDT) Received: from localhost.localdomain ([103.150.184.130]) by smtp.gmail.com with ESMTPSA id y5-20020aa79ae5000000b00537aa0fbb57sm1071241pfp.51.2022.09.02.01.32.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Sep 2022 01:32:59 -0700 (PDT) From: Yunlong Jia To: LKML Cc: Bob Moragues , Douglas Anderson , Henry Sun , Yunlong Jia , Dmitry Torokhov , Greg Kroah-Hartman , Guenter Roeck , Johnny Chuang , linux-input@vger.kernel.org Subject: [PATCH 2/2] input: touchscreen: elants_i2c: Add eth3915n touchscreen chip Date: Fri, 2 Sep 2022 08:32:36 +0000 Message-Id: <20220902082843.2.I19ac6cf9b8502d92f551ff4166861debb14576ec@changeid> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220902082843.1.I7da6ff6c8e8700624d61e51ff7d09e151bd83dcb@changeid> References: <20220902082843.1.I7da6ff6c8e8700624d61e51ff7d09e151bd83dcb@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 --- 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);