From patchwork Wed Nov 4 15:30:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 320536 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp5528871ilc; Wed, 4 Nov 2020 07:30:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7CzfXbKy7PdNsq+Q8azOofQFFZ0KXRhBZoRcUa/nULg6gjP3yv5rQQjLNaDzImuqpVp+M X-Received: by 2002:a17:906:4d52:: with SMTP id b18mr7088212ejv.553.1604503846638; Wed, 04 Nov 2020 07:30:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604503846; cv=none; d=google.com; s=arc-20160816; b=RbC64wkSZ5FLLOgmaVp5zAgc3ySDtbtiBMSTexjUrxSQ0buG8h1dxunY31lV1j/UxC 4f2XGZaiyC8yWaCVLFPA2DUDFTnmfwOQ3xmFZWIGMeSgiHC/DJjQCQAufoOvCHlvi6iC HqJjIWzggHadv1j7uh6wByj++1F3YJozcLQvORHJpdPRMvN91zTICtmswnXAmeYHbblH UmAhLi09Bqn5FQJ8qAX/z+M4X4/+qYkr2F7XyBzkox+g1MM0b71l7ECGfRYeqUduiDiy AmrnvpGXnD+81lhZ7Tb2xJ3xXw5HviyuvtzVMGqGZr2JOTg7iMduusPHJODxivYfiPCs DzOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yRASjRKxtplopJt2MsU1Jw8BgtmuvKdoRaCX+NVYm3Q=; b=qXVyGe2fmkCk7Llh8kB95NCqfWqYB3bTzMcORoL/G07IxKWaSiANImbG++m6fchyu2 7W4hthOiT4hCmA8r8fs0vzJIdR8IBSNaDgCuiPyhL/IZzCvo0sHvwzgCoqUM9+slMa4N 0bVR9hM/yVCWcTohbcjBbiWMKw5gRgb4yvSWDVi+U6bb5B59igd+0WL4lxv8LpjFESlV sYuoU5fn+xp4HTLqHUfOeJatdgrxkk/WAChjwYuIKOdxt9xnlkUQXThE0bXOdWgZYPjg SlKfzxrHZEpq97AW511DLUN1KTRa1q2ubvg5qDfUo+8SYi0OXZxtgBdstOnr1gP95xRI MBbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q4ZJAOCq; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r11si1521530edi.348.2020.11.04.07.30.46; Wed, 04 Nov 2020 07:30:46 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q4ZJAOCq; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730424AbgKDPao (ORCPT + 6 others); Wed, 4 Nov 2020 10:30:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730001AbgKDPao (ORCPT ); Wed, 4 Nov 2020 10:30:44 -0500 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 645B9C0613D3 for ; Wed, 4 Nov 2020 07:30:42 -0800 (PST) Received: by mail-lf1-x143.google.com with SMTP id a7so27643065lfk.9 for ; Wed, 04 Nov 2020 07:30:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yRASjRKxtplopJt2MsU1Jw8BgtmuvKdoRaCX+NVYm3Q=; b=q4ZJAOCqlJKBmGhQnreQ8Zb8K3jzZs0mfQJ2yqw+tBw7LbIlue4ATYMP59/eTQSvXU IZPbK7je3rzunmuSe68rLjQ1y4S5hP3DxF9t1UOLgTH3qBp3HN0UWmnJAAsTnnttNY/R t4LT9+5mEPsK9kJpu4iksE8z2oe41ZO3/LY3N87YLsWYeq3sKa5CwpOjtR9Olvob3kss uowK4ZfjG9eRIUdm/J1WuVq5kml79TdeYBAbbKW9LrlmfroS8Ka7hHUe5WnuWzCddA1m TMtzrXLMGd3ro/MGjAJ771RK02x33cjmMAo8ILH/lQ+LbRvpWA7PXERGPU9+4yKLJb2l TqSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yRASjRKxtplopJt2MsU1Jw8BgtmuvKdoRaCX+NVYm3Q=; b=Cn3qfX44ucg8tC/zZlkjoAP5FRrqP6Kh4rxh6+NI7V81fzGcu7xfHz7rJYxsvyJyqE o715040WAUnZfKU4EbmXJvzD6sdFnITTAwKWl1gUnW/Ed1Xq0Lr6WtnCPJ0faKCxnyhJ bBlLuvpE9sjLTGIhshp1EQ9UdEdq64YgEQAThma5YFyI1+6jlLpS9waYbgDAIhx4MCiS R3mldqp4zHWxYZqtNqNwrvfEtyHqJHoPAOtT4dg7t+Ct9CBrFdG0sEtGs4p8hPvN9bQZ /WAzNQ3qG/LutdmBu7WkYcbhKTV0ECgeIE3CQ4hYSoJPmWxCTK40O9G8svHbvI0ONfF1 LCbg== X-Gm-Message-State: AOAM531Ca7N32bK5dqCotifNZCQKSX3vzWmF+eGW0wtg7YbWct6SiKXW GG6O/2NT6c6UhEMY3wJyC/Ysfw== X-Received: by 2002:a19:7518:: with SMTP id y24mr7062984lfe.133.1604503840859; Wed, 04 Nov 2020 07:30:40 -0800 (PST) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id c131sm440453lfg.110.2020.11.04.07.30.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 07:30:40 -0800 (PST) From: Linus Walleij To: Dmitry Torokhov , linux-input@vger.kernel.org Cc: Linus Walleij , Nick Dyer , Stephan Gerhold , devicetree@vger.kernel.org Subject: [PATCH 2/3 v2] Input: atmel_mxt_ts - Convert bindings to YAML and extend Date: Wed, 4 Nov 2020 16:30:31 +0100 Message-Id: <20201104153032.1387747-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201104153032.1387747-1-linus.walleij@linaro.org> References: <20201104153032.1387747-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This converts the Armel MXT touchscreen bindings to YAML format and extends them with the following two properties: - vdda-supply: the optional analog supply voltage - vdd-supply: the optional digital supply voltage I also explained about the reset-gpios property that this better be flagged as active high (0) despite actually being active low, because all current device trees and drivers assume that this is the case and will actively drive the line low to assert RESET. Tested the schema with all in-tree users and they verify fine. Cc: Nick Dyer Cc: Stephan Gerhold Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - State that the GPIO lines shall be flagged as active low. We will fix all users. --- .../bindings/input/atmel,maxtouch.txt | 41 ---------- .../bindings/input/atmel,maxtouch.yaml | 81 +++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 82 insertions(+), 42 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.txt create mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.yaml -- 2.26.2 diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt deleted file mode 100644 index c88919480d37..000000000000 --- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt +++ /dev/null @@ -1,41 +0,0 @@ -Atmel maXTouch touchscreen/touchpad - -Required properties: -- compatible: - atmel,maxtouch - - The following compatibles have been used in various products but are - deprecated: - atmel,qt602240_ts - atmel,atmel_mxt_ts - atmel,atmel_mxt_tp - atmel,mXT224 - -- reg: The I2C address of the device - -- interrupts: The sink for the touchpad's IRQ output - See ../interrupt-controller/interrupts.txt - -Optional properties for main touchpad device: - -- linux,gpio-keymap: When enabled, the SPT_GPIOPWN_T19 object sends messages - on GPIO bit changes. An array of up to 8 entries can be provided - indicating the Linux keycode mapped to each bit of the status byte, - starting at the LSB. Linux keycodes are defined in - . - - Note: the numbering of the GPIOs and the bit they start at varies between - maXTouch devices. You must either refer to the documentation, or - experiment to determine which bit corresponds to which input. Use - KEY_RESERVED for unused padding values. - -- reset-gpios: GPIO specifier for the touchscreen's reset pin (active low) - -Example: - - touch@4b { - compatible = "atmel,maxtouch"; - reg = <0x4b>; - interrupt-parent = <&gpio>; - interrupts = ; - }; diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml new file mode 100644 index 000000000000..8c6418f76e94 --- /dev/null +++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/atmel,maxtouch.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Atmel maXTouch touchscreen/touchpad + +maintainers: + - Nick Dyer + - Linus Walleij + +description: | + Atmel maXTouch touchscreen or touchpads such as the mXT244 + and similar devices. + +properties: + compatible: + const: atmel,maxtouch + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + vdda-supply: + description: + Optional regulator for the AVDD analog voltage. + + vdd-supply: + description: + Optional regulator for the VDD digital voltage. + + reset-gpios: + maxItems: 1 + description: + Optional GPIO specifier for the touchscreen's reset pin + (active low). The line must be flagged with + GPIO_ACTIVE_LOW. + + linux,gpio-keymap: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + When enabled, the SPT_GPIOPWN_T19 object sends messages + on GPIO bit changes. An array of up to 8 entries can be provided + indicating the Linux keycode mapped to each bit of the status byte, + starting at the LSB. Linux keycodes are defined in + . + + Note: the numbering of the GPIOs and the bit they start at varies + between maXTouch devices. You must either refer to the documentation, + or experiment to determine which bit corresponds to which input. Use + KEY_RESERVED for unused padding values. + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + touchscreen@4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + interrupt-parent = <&gpio>; + interrupts = <26 IRQ_TYPE_EDGE_FALLING>; + reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; + vdda-supply = <&ab8500_ldo_aux2_reg>; + vdd-supply = <&ab8500_ldo_aux5_reg>; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index e73636b75f29..b4b46fcb82db 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2966,7 +2966,7 @@ ATMEL MAXTOUCH DRIVER M: Nick Dyer S: Maintained T: git git://github.com/ndyer/linux.git -F: Documentation/devicetree/bindings/input/atmel,maxtouch.txt +F: Documentation/devicetree/bindings/input/atmel,maxtouch.yaml F: drivers/input/touchscreen/atmel_mxt_ts.c ATMEL WIRELESS DRIVER