From nobody Mon Feb 9 12:11:25 2026 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 304A3C7EE24 for ; Mon, 5 Jun 2023 06:05:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229549AbjFEGFt (ORCPT ); Mon, 5 Jun 2023 02:05:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjFEGFq (ORCPT ); Mon, 5 Jun 2023 02:05:46 -0400 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB874E9 for ; Sun, 4 Jun 2023 23:05:42 -0700 (PDT) Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-6b1fa5a03daso111348a34.1 for ; Sun, 04 Jun 2023 23:05:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20221208.gappssmtp.com; s=20221208; t=1685945142; x=1688537142; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BQr3RN9zgUO2hKzzgYpy0fgrqaq999hm2iLdMsuMThM=; b=JE30JrNqKbf4xUGygx7fVV3lfLIqR3UPFTmY0GoQcNzHtdtDM7oOjTxkrydVol5jRy w9YjjSg9GVY9ACBMvfUwisSRUKEG6ah7dEAVIQQRg+77bQzx71ZZwlf+XrmaUFgQeCKy aIixFZceH8qZZK12miyGeIN5fZK08zAI3AhPFnjYggnIEA7j/Xac+OTn9LiXRgJUhg3F q3veSpHwEICOQgPGFZVof1XtcxikKJF5CaIxvnZ6RO81WritspgXO5dd376/UxPICyb0 8PIU7m/hoDf9IexltnPZS32MyMOEiDi6pMSlPcVuW8+Ki7sXE5Fubdhbw8IM0FjGt5j9 8nbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685945142; x=1688537142; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BQr3RN9zgUO2hKzzgYpy0fgrqaq999hm2iLdMsuMThM=; b=U1cN7doUDXqNKArql0/UZOzoBIe30C3P3e5oaPQXnaxNCewXjzCgyq+DpgftdMqJHs P23TTmgnFLhviktSM52SuXIsaUh/jmluvGiIe5i33dW0b5ws8KDKf5TVgVQfwC1qAVkQ uwh+JFCY5PK8gQm/T6Bfu0lGooZagVKJhyjqbq+u5Eg3HtrqLUX6F7R7FXvbRykrkFOb g008KGPTDyzWb0XurG0DJRF5yqoEZRpPeQhXXLps2Q1DRrjSoSU2GSuyumjxAD8WVB1P fWsOrM1dned30ej0E3dAkIqtEwcGn7HEMtESK+/IoCgG+P5ITtpzbTHU220qRsZwN7cS na1g== X-Gm-Message-State: AC+VfDz+MWii8kplaFBAarU02JBN6iYuMsLzyYIdh1xDkVIAZIeGDzlH zA+iT+71QbMWwTtyjb8VD5UimA== X-Google-Smtp-Source: ACHHUZ7ZL45qJ975qyVztmAiMuU/lrIoc/un/GgTY0x9EsXC5DkEwcHIFdCuL5lAWgtIjjd2Mx1+Ng== X-Received: by 2002:a9d:624d:0:b0:6af:7fed:1fd3 with SMTP id i13-20020a9d624d000000b006af7fed1fd3mr5679813otk.31.1685945141936; Sun, 04 Jun 2023 23:05:41 -0700 (PDT) Received: from yc.huaqin.com ([101.78.151.214]) by smtp.gmail.com with ESMTPSA id 128-20020a630786000000b0053ba104c113sm5031379pgh.72.2023.06.04.23.05.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jun 2023 23:05:41 -0700 (PDT) From: Cong Yang To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, dmitry.torokhov@gmail.com, jikos@kernel.org, benjamin.tissoires@redhat.com, dianders@chromium.org, hsinyi@google.com Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Cong Yang Subject: [PATCH v2 1/2] dt-bindings: input: touchscreen: Add ilitek 9882T touchscreen chip Date: Mon, 5 Jun 2023 14:05:23 +0800 Message-Id: <20230605060524.1178164-2-yangcong5@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230605060524.1178164-1-yangcong5@huaqin.corp-partner.google.com> References: <20230605060524.1178164-1-yangcong5@huaqin.corp-partner.google.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add an ilitek touch screen chip ili9882t. Signed-off-by: Cong Yang --- .../bindings/input/elan,ekth6915.yaml | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml b/D= ocumentation/devicetree/bindings/input/elan,ekth6915.yaml index 05e6f2df604c..f0e7ffdce605 100644 --- a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml +++ b/Documentation/devicetree/bindings/input/elan,ekth6915.yaml @@ -15,11 +15,14 @@ description: =20 properties: compatible: - items: - - const: elan,ekth6915 + enum: + - elan,ekth6915 + - ilitek,ili9882t =20 reg: - const: 0x10 + enum: + - 0x10 + - 0x41 =20 interrupts: maxItems: 1 @@ -29,11 +32,13 @@ properties: =20 vcc33-supply: description: The 3.3V supply to the touchscreen. + If using ili9882t then this supply will not be needed. =20 vccio-supply: description: The IO supply to the touchscreen. Need not be specified if this is t= he same as the 3.3V supply. + If using ili9882t, the IO supply is required. =20 required: - compatible @@ -41,6 +46,18 @@ required: - interrupts - vcc33-supply =20 +if: + properties: + compatible: + contains: + const: ilitek,ili9882t +then: + required: + - compatible + - reg + - interrupts + - vccio-supply + additionalProperties: false =20 examples: --=20 2.25.1 From nobody Mon Feb 9 12:11:25 2026 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 A8F95C7EE24 for ; Mon, 5 Jun 2023 06:06:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229545AbjFEGGD (ORCPT ); Mon, 5 Jun 2023 02:06:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229565AbjFEGGB (ORCPT ); Mon, 5 Jun 2023 02:06:01 -0400 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74935DE for ; Sun, 4 Jun 2023 23:05:58 -0700 (PDT) Received: by mail-oi1-x22d.google.com with SMTP id 5614622812f47-392116b8f31so2236810b6e.2 for ; Sun, 04 Jun 2023 23:05:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20221208.gappssmtp.com; s=20221208; t=1685945157; x=1688537157; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NafLjDBYefQHH3Gad7ICKC/rnUp/PXcgqV+CuJGbaps=; b=bYsw33Yw4q4Fc/XuiRKnniS7T8cCWejB2X4rnmMacWbnQjwtHSD+hZEmOfKjZAMOx5 hyvg8ajElijvJS6m5SfIRPij/V1L5CST6egio3Pu0zUENUTSz73yEDu1Kd867+/13hmx +tXd35KwbsoMhYDglfK6RapqEwvTRRfd7WHtPDrB79Y4Y+3dqidngVBOfEzKdD1UpMxu IEh3SG9tdY9qT8Dj7AyFUmIqxTIBBVtunj2FD1TKVeKKjnLe0sZDxVEiXwvX1wwVqJP+ MAF5/FQSekHxg75ZAKwbSNPwCis35hwaiWAmI03FwKZyssxnnhMCZ10hR2ZBoo/yOO5H hOog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685945157; x=1688537157; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NafLjDBYefQHH3Gad7ICKC/rnUp/PXcgqV+CuJGbaps=; b=H/LDN1ZzqwPp9I20Ar5DhcRFeO7UbtCPWxXRwTEGTNV6nGMfEanMCIsa1EDyahXBj3 tqD8MkCobWEKSMpS7naoZOfWd64J2YdsmVk4qpKh5JPQDdA2pRyMHUandeWAM0QnIhiP wLlrBFacl5iKElucyVFTeyE5tiPEvJKKUrip5XCsoFkLWqZqqOaVcwHYb+K2WskvsNL0 SyLE3mLIhuS8zn6fepV74wCI0W+k1UJbRgeS1pbCgvw8raFiUa8i3JwOPqcRUNeQX0qZ SiOjAe8j1MNu5OqyG7vFdG98kzzkfk4r6jDm5oKxU+tfJc9g3F/JuElfIKXSRwM81CFt iTQw== X-Gm-Message-State: AC+VfDzGLFif1d8csKMb2P0OYkwbdSKTcrqjVt8Hu4eb/7FTzNEb1CtY ab8exB5jlBY9cIAS5/SttTi34g== X-Google-Smtp-Source: ACHHUZ55zMj/HVRzMaN8WfmCHJjg81JjjNRWwiQ6+/v8ENDHdZY37NOWgrcJ0d+tJm9E5tWpNAkGHA== X-Received: by 2002:a05:6358:e91d:b0:129:c4a6:8892 with SMTP id gk29-20020a056358e91d00b00129c4a68892mr638202rwb.17.1685945157177; Sun, 04 Jun 2023 23:05:57 -0700 (PDT) Received: from yc.huaqin.com ([101.78.151.214]) by smtp.gmail.com with ESMTPSA id 128-20020a630786000000b0053ba104c113sm5031379pgh.72.2023.06.04.23.05.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jun 2023 23:05:56 -0700 (PDT) From: Cong Yang To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, dmitry.torokhov@gmail.com, jikos@kernel.org, benjamin.tissoires@redhat.com, dianders@chromium.org, hsinyi@google.com Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Cong Yang Subject: [PATCH v2 2/2] HID: i2c-hid: elan: Add ili9882t timing Date: Mon, 5 Jun 2023 14:05:24 +0800 Message-Id: <20230605060524.1178164-3-yangcong5@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230605060524.1178164-1-yangcong5@huaqin.corp-partner.google.com> References: <20230605060524.1178164-1-yangcong5@huaqin.corp-partner.google.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The ili9882t is a TDDI IC (Touch with Display Driver). The datasheet specifies there should be 60ms between touch SDA sleep and panel RESX. Doug's series[1] allows panels and touchscreens to power on/off together, so we can add the 65 ms delay in i2c_hid_core_suspend before panel_unprepar= e. [1]: https: //lore.kernel.org/all/20230523193017.4109557-1-dianders@chromiu= m.org/ Signed-off-by: Cong Yang --- drivers/hid/i2c-hid/i2c-hid-of-elan.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/hid/i2c-hid/i2c-hid-of-elan.c b/drivers/hid/i2c-hid/i2= c-hid-of-elan.c index 76ddc8be1cbb..411d7ea2725d 100644 --- a/drivers/hid/i2c-hid/i2c-hid-of-elan.c +++ b/drivers/hid/i2c-hid/i2c-hid-of-elan.c @@ -18,7 +18,8 @@ #include "i2c-hid.h" =20 struct elan_i2c_hid_chip_data { - unsigned int post_gpio_reset_delay_ms; + unsigned int post_gpio_reset_on_delay_ms; + unsigned int post_gpio_reset_off_delay_ms; unsigned int post_power_delay_ms; u16 hid_descriptor_address; }; @@ -52,8 +53,8 @@ static int elan_i2c_hid_power_up(struct i2chid_ops *ops) msleep(ihid_elan->chip_data->post_power_delay_ms); =20 gpiod_set_value_cansleep(ihid_elan->reset_gpio, 0); - if (ihid_elan->chip_data->post_gpio_reset_delay_ms) - msleep(ihid_elan->chip_data->post_gpio_reset_delay_ms); + if (ihid_elan->chip_data->post_gpio_reset_on_delay_ms) + msleep(ihid_elan->chip_data->post_gpio_reset_on_delay_ms); =20 return 0; } @@ -64,6 +65,9 @@ static void elan_i2c_hid_power_down(struct i2chid_ops *op= s) container_of(ops, struct i2c_hid_of_elan, ops); =20 gpiod_set_value_cansleep(ihid_elan->reset_gpio, 1); + if (ihid_elan->chip_data->post_gpio_reset_off_delay_ms) + msleep(ihid_elan->chip_data->post_gpio_reset_off_delay_ms); + regulator_disable(ihid_elan->vccio); regulator_disable(ihid_elan->vcc33); } @@ -101,12 +105,20 @@ static int i2c_hid_of_elan_probe(struct i2c_client *c= lient) =20 static const struct elan_i2c_hid_chip_data elan_ekth6915_chip_data =3D { .post_power_delay_ms =3D 1, - .post_gpio_reset_delay_ms =3D 300, + .post_gpio_reset_on_delay_ms =3D 300, + .hid_descriptor_address =3D 0x0001, +}; + +static const struct elan_i2c_hid_chip_data ilitek_ili9882t_chip_data =3D { + .post_power_delay_ms =3D 1, + .post_gpio_reset_on_delay_ms =3D 200, + .post_gpio_reset_off_delay_ms =3D 65, .hid_descriptor_address =3D 0x0001, }; =20 static const struct of_device_id elan_i2c_hid_of_match[] =3D { { .compatible =3D "elan,ekth6915", .data =3D &elan_ekth6915_chip_data }, + { .compatible =3D "ilitek,ili9882t", .data =3D &ilitek_ili9882t_chip_data= }, { } }; MODULE_DEVICE_TABLE(of, elan_i2c_hid_of_match); --=20 2.25.1