Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1680320pxj; Wed, 19 May 2021 11:18:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJB+EY0+sjer+xPjfp+gQQ8Lexh9npktmBUBQ/T8QP7lh/OAvyfVTPam+YojpFhSDnRk0c X-Received: by 2002:a05:6402:4414:: with SMTP id y20mr377346eda.41.1621448317801; Wed, 19 May 2021 11:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621448317; cv=none; d=google.com; s=arc-20160816; b=sPuEeoJlogzIUOXy04ywUREl8DLxUcEjeg4p2/nh7tdogpADBprXFFfU4V3OB6QwPh CdUxdQ6ukD9s9u6FukJkyeQecSJliFgGxNrubCpDHsv95NiVn1DCI148xmUdmpfb9ACf RLs/7+/VZIAr2Lk5awNmD1BJiLEymS707Ekl9BilWUaQcvD/bB8Aagh8Yn1YP/9mOMor jr3zwemNi2b+PGp9bL95DyhSXp+hv8RD4IACPdYObKLGu6tyFrbVIbBYzaSeGPr2eI4Z V5RgGoyxwNmqe9bi0I5N1ADsYVCYB4jQIy3ulbKXTQyF21QZ1mIKITtd9I6uxZajXNmW +GsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=i/3knGC4CpMEkTbYVCH3cvqb7hCOaLFy+F4QJW4cARQ=; b=EdKo6UcBO9bJat/W3gDkwXov6yXUXnLAvSH8f8OPHTOKI/F1Rgpap0+JcP1UdToU+B Kr5Rc/fxsq1pn/ZsSZhxOjkaH5rMJ/IyoqVpcbHxBJ0FajCBCAr+H7VnT4P5grGfvLZX MZNOH86ehoTq3+KUq07TcwQ5az7TDWDDTaoNyG/jtga2fDpUj4rARs1MLBXwnRgc2Gpc lgjCxOd1iwbOrNwTCy/NA/RGxPrH6bUfYKbY+KMXdHuXg3Cn4j3Q5Y/Njk407jqQDPTK p1H5hVWFuuDwgRsxlaqE7T0+rGmDmyFcu0tcNWvO5mM6JB9SLBIh5jlQj+oggdMpgCZ8 ZAKw== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y10si343379ejp.136.2021.05.19.11.18.14; Wed, 19 May 2021 11:18:37 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241266AbhEROsm (ORCPT + 99 others); Tue, 18 May 2021 10:48:42 -0400 Received: from mail-ot1-f42.google.com ([209.85.210.42]:35591 "EHLO mail-ot1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234550AbhEROsl (ORCPT ); Tue, 18 May 2021 10:48:41 -0400 Received: by mail-ot1-f42.google.com with SMTP id 69-20020a9d0a4b0000b02902ed42f141e1so8849942otg.2; Tue, 18 May 2021 07:47:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=i/3knGC4CpMEkTbYVCH3cvqb7hCOaLFy+F4QJW4cARQ=; b=VgIUTGjFIYEyx89OyA+x2eyprZkhbidxndWSDmGvKvsU2F/BjQhjZ37I0pcEaJ2UL+ Yd4zuVIZhMXhbSwHeMfwTbx9vxw4viMRyS9NSzqMBDQDBWmrp/aGsdL/stQQb0qP3F+g yP1lkhXcn1ReYkYi+9TCyV1JkrkA0R9VX7nrK/DkvQDYIY3VIbhPbA2g94UooOs/wdz5 lsFdHM+9iudcJkLw47shxd6g8ONYgOgqYW1gKGJz9vysYJhRcq5IkgWXGwrEATFerEBI ZwH6NE/9ITMiyBDfyJc6dZdI5s7kNcjUNff3V8Y3DWi5on/oZw7YtfrgYlYSeeRN4KI5 aVZQ== X-Gm-Message-State: AOAM533TChvvo9usaT6J3KEu6QzM2d7TUIGMb+2fcRqYDqE7AiG34h8Y SG0SWqjtmLfLOYU1/7qDP8gRvUttxA== X-Received: by 2002:a05:6830:1284:: with SMTP id z4mr4599470otp.148.1621349243412; Tue, 18 May 2021 07:47:23 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id v79sm3415081oia.14.2021.05.18.07.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 07:47:23 -0700 (PDT) Received: (nullmailer pid 656643 invoked by uid 1000); Tue, 18 May 2021 14:47:22 -0000 Date: Tue, 18 May 2021 09:47:22 -0500 From: Rob Herring To: Oleksij Rempel Cc: Dmitry Torokhov , Jonathan Cameron , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, David Jander , devicetree@vger.kernel.org Subject: Re: [PATCH v2] dt-bindings: touchscreen: Convert resistive-adc-touch binding to json schema Message-ID: <20210518144722.GA617855@robh.at.kernel.org> References: <20210517071825.20316-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210517071825.20316-1-o.rempel@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 17, 2021 at 09:18:24AM +0200, Oleksij Rempel wrote: > 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 | 61 +++++++++++++++++++ > 2 files changed, 61 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..53df21a6589e > --- /dev/null > +++ b/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml > @@ -0,0 +1,61 @@ > +# 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 maxItems is implied by the 'items' length. > + items: > + - description: x > + - description: y > + - description: pressure (optional) > + > + io-channel-names: This needs minItems, too. > + items: > + - const: x > + - const: y > + - const: pressure > + > + touchscreen-size-x: true > + touchscreen-size-y: true > + touchscreen-fuzz-x: true > + touchscreen-fuzz-y: true > + touchscreen-inverted-x: true > + touchscreen-inverted-y: true > + touchscreen-swapped-x-y: true > + touchscreen-min-pressure: true > + > +additionalProperties: false > + > +required: > + - compatible > + - io-channels > + - io-channel-names > + > +examples: > + - | > + resistive_touch { touchscreen { > + 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 >