From patchwork Tue Mar 2 08:51:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Sm9lIEh1bmcgKOa0qumKmOmZvSk=?= X-Patchwork-Id: 12111589 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DDB6C4332B for ; Tue, 2 Mar 2021 12:54:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B974464EE8 for ; Tue, 2 Mar 2021 12:54:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350806AbhCBMuF (ORCPT ); Tue, 2 Mar 2021 07:50:05 -0500 Received: from mail.ilitek.com ([60.251.199.109]:55081 "EHLO cello.ilitek.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1446375AbhCBJAI (ORCPT ); Tue, 2 Mar 2021 04:00:08 -0500 X-UUID: eb9ed263bada44a3b4a20742030ecc2a-20210302 X-UUID: eb9ed263bada44a3b4a20742030ecc2a-20210302 Received: from ex2.ili.com.tw [(192.168.1.132)] by cello.ilitek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.12 Build 0701 with TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 128/128) with ESMTP id 868602740; Tue, 02 Mar 2021 16:51:26 +0800 Received: from EX1.ili.com.tw (192.168.1.131) by EX2.ili.com.tw (192.168.1.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 2 Mar 2021 16:51:24 +0800 Received: from joehung-Ilitek.ili.com.tw (192.168.18.73) by EX1.ili.com.tw (192.168.1.133) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Tue, 2 Mar 2021 16:51:24 +0800 From: Joe Hung To: , , CC: , , Subject: [PATCH v4 1/2] dt-bindings: input: touchscreen: ilitek_ts_i2c: Add bindings Date: Tue, 2 Mar 2021 16:51:29 +0800 Message-ID: <20210302085130.2558297-1-joe_hung@ilitek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Add binding documentation for ILITEK touch devices. Signed-off-by: Joe Hung --- Changes in v4: - Change IRQ flag to level interrupt - Add support for common touchscreen-related properties - Modify reset gpio to active low - Modify irq type to LEVEL_LOW - Add compatible for Lego series ICs Changes in v3: - Add include header in examples, and pass the dt binding check Changes in v2: - Convert to DT schema format - Using interrupts instead of irq-gpios .../input/touchscreen/ilitek_ts_i2c.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/ilitek_ts_i2c.yaml -- 2.25.1 diff --git a/Documentation/devicetree/bindings/input/touchscreen/ilitek_ts_i2c.yaml b/Documentation/devicetree/bindings/input/touchscreen/ilitek_ts_i2c.yaml new file mode 100644 index 000000000000..7fe7ee8a8b20 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/ilitek_ts_i2c.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/touchscreen/ilitek_ts_i2c.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ilitek I2C Touchscreen Controller + +maintainers: + - Dmitry Torokhov + +allOf: + - $ref: touchscreen.yaml# + +properties: + compatible: + enum: + - ilitek,ili2130 + - ilitek,ili2131 + - ilitek,ili2132 + - ilitek,ili2316 + - ilitek,ili2322 + - ilitek,ili2323 + - ilitek,ili2326 + - ilitek,ili2520 + - ilitek,ili2521 + reg: + const: 0x41 + interrupts: + maxItems: 1 + reset-gpios: + maxItems: 1 + + touchscreen-size-x: true + touchscreen-size-y: true + touchscreen-inverted-x: true + touchscreen-inverted-y: true + touchscreen-swapped-x-y: true + + wakeup-source: + type: boolean + description: touchscreen can be used as a wakeup source. + +additionalProperties: false + +required: + - compatible + - reg + - interrupts + - reset-gpios + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + touchscreen@41 { + compatible = "ilitek,ili2520"; + reg = <0x41>; + interrupt-parent = <&gpio1>; + interrupts = <7 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; + + touchscreen-inverted-y; + }; + };