From nobody Mon Feb 9 00:46:34 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 22CC1C7EE25 for ; Wed, 7 Jun 2023 13:35:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240774AbjFGNf3 (ORCPT ); Wed, 7 Jun 2023 09:35:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240817AbjFGNfU (ORCPT ); Wed, 7 Jun 2023 09:35:20 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF9AE1BE6 for ; Wed, 7 Jun 2023 06:35:17 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-543ae6ce8d1so3292751a12.2 for ; Wed, 07 Jun 2023 06:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20221208.gappssmtp.com; s=20221208; t=1686144917; x=1688736917; 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=QfUV/Cp7glFPn9A4mv5hVzho0tfvpQrDqpAb8xgmZ74=; b=gBEDGQ/rQtY7ZM2XNTz68DIASaYbbJH84H3AyupZx5/TKNyJ0ZxXFdtU+xyGaTLNT3 nUz0gqNdHVnrfJHXUpoYwips3dkPb9gnfw3Ig61zMtyvYYRoWSatSDR4aPaZ2bYzJW+o uIjGENAvrgdDmlGIgCFAP3mahMeRi7FO6Pht3NKWi+R0wFGULG9LlT+QJWOJYEBF+tkq R9JKmuX/Fte6vAPi1BGwE7If7p7b+OJqrwyFi7KDkyw5sGIh+CeTbN3UGzj9vGGoaAAq DiA9Q6GuTpuXc8yln74476hOm8PZp5rgrJ8OqSKapsyPe4LYoJPzKMojs3rcwAIDWRdI 01Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686144917; x=1688736917; 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=QfUV/Cp7glFPn9A4mv5hVzho0tfvpQrDqpAb8xgmZ74=; b=UD2LqSLUbaou1Uyu5nN/k67vnL8mp0IaCag9xVln5AqOgFv3g6ZHhvly/nK/p/rdOJ Xb+iiqgMrUD3Qw8mWhYH9wZZuZm1MV5lqEoaZSCn+399INqHMw6cu/F7ZWh8Ht3ZfD0l Q/f0aOgh6XFHDSVzw1fqWZK4izrO3k9OVsq8fW/FPx5lMTubrX5rojWdb/tp2TOsPSpX nE39kSRH+a6qnDzKG4XUepMU5qxhNHMlZ3uXrDqgTOkrCMvSY4Gg3JClev58la+oRLcz /psfIhx1FJS/rcWCip9pOCgWyOLixmJoIH+lEWpkxJc/yX7V582/ON5Bb1SSMXl6E9bS PRlQ== X-Gm-Message-State: AC+VfDzBaWYuuAJZZLz6wvGNn8IvDSjQFe2sSsuYHMiHQwDb6Khfrw48 HnxVJs3aRkm2ceSLpcImQH2OlA== X-Google-Smtp-Source: ACHHUZ6SiBwSAnVD3kQwjmkqR48FnJ0G0Az7HsbFPe+boSJGAJXSi9rExpEjCTfGIEYNjrhHDEnwJg== X-Received: by 2002:a17:902:9a06:b0:1b2:4be9:c25d with SMTP id v6-20020a1709029a0600b001b24be9c25dmr2077437plp.4.1686144917436; Wed, 07 Jun 2023 06:35:17 -0700 (PDT) Received: from yc.huaqin.com ([101.78.151.214]) by smtp.gmail.com with ESMTPSA id y20-20020a170902ed5400b001b034faf49csm10405680plb.285.2023.06.07.06.35.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 06:35:17 -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 v3 1/2] dt-bindings: HID: i2c-hid: ilitek: Introduce bindings for Ilitek ili9882t Date: Wed, 7 Jun 2023 21:34:57 +0800 Message-Id: <20230607133458.4075667-2-yangcong5@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230607133458.4075667-1-yangcong5@huaqin.corp-partner.google.com> References: <20230607133458.4075667-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 touch screen chip same as Elan eKTH6915 controller has a reset gpio. The difference is that ili9882t needs to use vccio-supply instead of vcc33-supply. Doug's series[1] allows panels and touchscreens to power on/off together, let's add a phandle for this. [1]: https: //lore.kernel.org/all/20230523193017.4109557-1-dianders@chromiu= m.org/ Signed-off-by: Cong Yang --- .../bindings/input/ilitek,ili9882t.yaml | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/ilitek,ili9882t= .yaml diff --git a/Documentation/devicetree/bindings/input/ilitek,ili9882t.yaml b= /Documentation/devicetree/bindings/input/ilitek,ili9882t.yaml new file mode 100644 index 000000000000..f69fa3aaf4c5 --- /dev/null +++ b/Documentation/devicetree/bindings/input/ilitek,ili9882t.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/ilitek,ili9882t.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ilitek ili9882t touchscreen controller + +maintainers: + - Dmitry Torokhov + +description: + Supports the Ilitek ili9882t touchscreen controller. + This touchscreen controller uses the i2c-hid protocol with a reset GPIO. + +properties: + compatible: + items: + - const: ilitek,ili9882t + + reg: + const: 0x41 + + interrupts: + maxItems: 1 + + panel: + description: If this is a touchscreen, the panel it's connected to. Th= is + indicates that the panel and touchscreen are expected to be power + sequenced together. + $ref: /schemas/types.yaml#/definitions/phandle + + reset-gpios: + description: Reset GPIO. + + + vccio-supply: + description: The 1.8V supply to the touchscreen. + +required: + - compatible + - reg + - interrupts + - vccio-supply + +additionalProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + touchscreen: touchscreen@41 { + compatible =3D "ilitek,ili9882t"; + reg =3D <0x41>; + + interrupt-parent =3D <&pio>; + interrupts =3D <12 IRQ_TYPE_LEVEL_LOW>; + + reset-gpios =3D <&pio 60 GPIO_ACTIVE_LOW>; + vccio-supply =3D <&mt6366_vio18_reg>; + }; + }; --=20 2.25.1 From nobody Mon Feb 9 00:46:34 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 23EFFC7EE29 for ; Wed, 7 Jun 2023 13:35:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240840AbjFGNfn (ORCPT ); Wed, 7 Jun 2023 09:35:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240878AbjFGNfc (ORCPT ); Wed, 7 Jun 2023 09:35:32 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB8221FD7 for ; Wed, 7 Jun 2023 06:35:26 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1b1806264e9so38344715ad.0 for ; Wed, 07 Jun 2023 06:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=huaqin-corp-partner-google-com.20221208.gappssmtp.com; s=20221208; t=1686144926; x=1688736926; 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=fKwUqHo5Vcp6qEMOdr+qgbBliBp4lX8cCeTzjjNJbpw=; b=vDexOXu2iIzDnbzJeHisiv80zH3JeZTpzRW3zRFkaQhe/QD9qIDmnUrEREOvWE2T3s TLVOMm1jlZK0nVBbYQ7wZVGj/pUa2TgmCYFpCboteWPAPQxpjrycjRxm3vQaQ/Y8dkcB mTO6G111vPXh+lNvDB7z7ZhGtwzUC/e8Q06nIhiW8Sqg0D5EsZg9s9xQNlxcg1CO+wck OU3hr92/PINnL1N/kcM9wGd0KwJ7m8TeYfOA6rYlCRH7ey8R/FwUzoJlFDMb8vK02g0I 09VIvog7Cw1ZiXT2T0Pvekq25iSaSiktEz0D22am7pfPyAFHSUGDluChWauQd2glW+WX CbPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686144926; x=1688736926; 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=fKwUqHo5Vcp6qEMOdr+qgbBliBp4lX8cCeTzjjNJbpw=; b=lHsLjlDp1NUC48MdEXQL1i8vWFTOh7KE/0Pbr6+Fmy8pkfuN6PaOGMpI2ermJb5N3G BWh7qGPkxfjbrf5V4CQA7fJ0DBHvDPvOgmW+WU7GXnp2O/R3RGSNkJAcf303IYIJ3TvJ ETqFcu0VTm79JyyL1S8/1l8aCQiV1nmHOQQKmsqERJRYKbmLoe8X6eWGFv1gXi08woip jWkik5/2D7dDd83VqUl2oK3VKtKRyyLffI/LTzqUfE8uVfIJiS4xuxPvhOzTwPtir87j mVsw2H+nMj8A/y9nBxX3+E6DZBwB4KVUQnY837nvzDiRLQzyyijT9givgFTfYnLryB3l C1lg== X-Gm-Message-State: AC+VfDwluHOYwmlKI6OOs85TqxrIbHxc0m6ONzGlgwJyc7jioP7CI88i z2Qo8tv5pMds6/4a9foR7LRk2w== X-Google-Smtp-Source: ACHHUZ4cx6vLE/wpixupF2+hfTcl4jtltVB8iMsN060sd7EriDE/221A7qPMluKKOsGTqKO0I8kKyw== X-Received: by 2002:a17:902:9888:b0:1af:ffda:855a with SMTP id s8-20020a170902988800b001afffda855amr2195158plp.9.1686144926260; Wed, 07 Jun 2023 06:35:26 -0700 (PDT) Received: from yc.huaqin.com ([101.78.151.214]) by smtp.gmail.com with ESMTPSA id y20-20020a170902ed5400b001b034faf49csm10405680plb.285.2023.06.07.06.35.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 06:35:25 -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 v3 2/2] HID: i2c-hid: elan: Add ili9882t timing Date: Wed, 7 Jun 2023 21:34:58 +0800 Message-Id: <20230607133458.4075667-3-yangcong5@huaqin.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230607133458.4075667-1-yangcong5@huaqin.corp-partner.google.com> References: <20230607133458.4075667-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_unprepare. [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