Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp297806pxj; Fri, 14 May 2021 03:50:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1yN1dzjMR6jIzhxxwAj1r/vxpLvYWt1SZ53PIfrFQMlde9NHvOu3hKNMIK2Ur6zZHFKde X-Received: by 2002:a17:906:c04b:: with SMTP id bm11mr47428025ejb.263.1620989436360; Fri, 14 May 2021 03:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620989436; cv=none; d=google.com; s=arc-20160816; b=LyyYcGHNx9/CunZ6y5OX+XnJ7419SkAdYCTYOSzdsmUwXxJjwpZQDPqlwA8L4yI3VC 7TB0fmg7BBVhGL3BzBoTD4PoNDydP0oKnDJZty5HFYXRF3SASizHtyRtmfQHkFXN0BfY dzY6A2cs80N7ZWmPgtGFpfrfJRINtjquzBexpg77EjrRBmxSvIva4DGu7yLkr86CxVGG OttL41qsl+vbEwBzkW4voyznhvR4htdcJyo344XByaP3Itp0fFBgNE410QNVa5+rV8mH NYs6FlKC3T9n5yst0X1wipKEgGTk82cMRHss+Jt33NzutKkQGVA8I/E+3wo8X0jUqktO 0VOg== 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 :message-id:date:subject:cc:to:from; bh=E4RtH1XesOH7IPPsKMyZ0VHNwdHzNxL6AlHnORB/k4o=; b=poi0qosMNN0/vt8XikAGGLKymjrrPiELd9OcK7cR9gxi9POa2bSfzFFY1z8kf1fYc4 gE4HvsVpC5cflEUpshtVaPCN1+6rwZUsK6DXWuHZmFDy1LEz+wsk4PiXt7Ioe8hju7M5 QBIzhLcJU7dlhGWhOLIcbbaL37zqoI4UQpywkDBksRt3ymqICH6B2UPGuo2kdX+5VQ0L 54ZRmt0H+giOjZ0tTy4HZB7fWkCnIsE+lGnQM1BVbIeVxq8s7vdD7IWEn6+4C6f/+gM3 iBAeDFaVETn3Kg34zKHhzL4HacO8cpewknDn/OLVmNQZ5vJHVFOUnHG8yZstS7ytS1Jp l4lA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g19si6237463edu.41.2021.05.14.03.50.13; Fri, 14 May 2021 03:50:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232930AbhENKW5 (ORCPT + 99 others); Fri, 14 May 2021 06:22:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232579AbhENKW5 (ORCPT ); Fri, 14 May 2021 06:22:57 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D207C061574 for ; Fri, 14 May 2021 03:21:31 -0700 (PDT) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhUwe-0000C7-2O; Fri, 14 May 2021 12:21:24 +0200 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lhUwc-0006R5-5z; Fri, 14 May 2021 12:21:22 +0200 From: Oleksij Rempel To: Dmitry Torokhov , Rob Herring , Jonathan Cameron Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, David Jander , devicetree@vger.kernel.org Subject: [PATCH v1] dt-bindings: touchscreen: Convert resistive-adc-touch binding to json schema Date: Fri, 14 May 2021 12:21:20 +0200 Message-Id: <20210514102120.24596-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the resistive-adc-touch binding to DT schema format using json-schema. Signed-off-by: Oleksij Rempel --- .../input/touchscreen/resistive-adc-touch.txt | 33 ------------ .../touchscreen/resistive-adc-touch.yaml | 52 +++++++++++++++++++ 2 files changed, 52 insertions(+), 33 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.txt create mode 100644 Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml diff --git a/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.txt b/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.txt deleted file mode 100644 index af5223bb5bdd..000000000000 --- a/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.txt +++ /dev/null @@ -1,33 +0,0 @@ -Generic resistive touchscreen ADC - -Required properties: - - - compatible: must be "resistive-adc-touch" -The device must be connected to an ADC device that provides channels for -position measurement and optional pressure. -Refer to -https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml -for details - - - iio-channels: must have at least two channels connected to an ADC device. -These should correspond to the channels exposed by the ADC device and should -have the right index as the ADC device registers them. These channels -represent the relative position on the "x" and "y" axes. - - iio-channel-names: must have all the channels' names. Mandatory channels -are "x" and "y". - -Optional properties: - - iio-channels: The third channel named "pressure" is optional and can be -used if the ADC device also measures pressure besides position. -If this channel is missing, pressure will be ignored and the touchscreen -will only report position. - - iio-channel-names: optional channel named "pressure". - -Example: - - resistive_touch: resistive_touch { - compatible = "resistive-adc-touch"; - touchscreen-min-pressure = <50000>; - io-channels = <&adc 24>, <&adc 25>, <&adc 26>; - io-channel-names = "x", "y", "pressure"; - }; diff --git a/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml b/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml new file mode 100644 index 000000000000..d8963068a05e --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/touchscreen/resistive-adc-touch.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic resistive touchscreen ADC + +maintainers: + - Oleksij Rempel + +description: | + Generic ADC based resistive touchscreen controller + The device must be connected to an ADC device that provides channels for + position measurement and optional pressure. + +allOf: + - $ref: touchscreen.yaml# + +properties: + compatible: + const: resistive-adc-touch + + io-channels: + minItems: 2 + maxItems: 3 + items: + - description: x + - description: y + - description: pressure (optional) + + io-channel-names: + items: + - const: x + - const: y + - const: pressure + +required: + - compatible + - io-channels + - io-channel-names + +additionalProperties: false + +examples: + - | + resistive_touch { + compatible = "resistive-adc-touch"; + touchscreen-min-pressure = <50000>; + io-channels = <&adc 24>, <&adc 25>, <&adc 26>; + io-channel-names = "x", "y", "pressure"; + }; -- 2.29.2