Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1403297pxj; Fri, 21 May 2021 13:24:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6AFj7E8HGjY6fFd6Sy2Mv2cw8wb0FUH++tosgzxySczuOOXLJsH2n3UBI9JF/vtE2yIpg X-Received: by 2002:a17:906:31c6:: with SMTP id f6mr11966261ejf.446.1621628666951; Fri, 21 May 2021 13:24:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628666; cv=none; d=google.com; s=arc-20160816; b=i2eYhqh/gINmiSnSHPKu9c07Jo9ocqvPcs5fw6V+ChAAnwZKeiOwvZZUahtY4j15gu lNX4gCjsWH8YB8DpVVd88dTjN+bDp91vpJQep7dOT7gbKuzuZxjEYrpkM2JDwIZRbYfO t6zoIrqJl4wTUuwySc5gCreFpCqBEaUgiJz8GCmOsyu/9kCgLPjao486suazptz7qYnz kyTGcWov1NAmU7gmcwLI0YQ4Ad3Sj6geFAw3imQACZFtNy/ek2ynPZTxpmBpKw8kop/K /9PR8y2XANEmYSOTOtute3iVr8omVXlUnriUjfHaPXp6Fq3Ta6Blww9sDdjWcjLJIH1N S3cg== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=XCxVRsb3xWbAtR17PrLimFgBdBLbZAoOTJ7ZW5OPw+M=; b=VD+P6cnT1f9JtLoxmuD2kTaRBXtXrT8CqApfsP/RCtwt3unyoubwfXumi595OaMI0S LNTxER/FFWIk8OTGtJNpnJHs/3GuJbvOR9DZ/6Bya4sIa9DbBJVAaPhVfiNRDrUE4qmw 4zBQX1P0T/szOktUT11etDMrCkCjb4qpQ7I8fH6+PaIsXkN5FCYwCT7N8RVCv/M9O+Vx 4B+JUoQb5zqlywj2t0hpLMO8dDlC4PjMoP1QeHIJ6RfvJApnuBYXgT22RSEDN94Atc+v Gfl+TIYIWbdoXXgUOd5aQkvzgkHrnPsYNQscSHSh9btRh6yiBOLSxki79xYnr1xglVLI +S9Q== 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a10si5669907edq.515.2021.05.21.13.24.04; Fri, 21 May 2021 13:24:26 -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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233209AbhEUQcc (ORCPT + 99 others); Fri, 21 May 2021 12:32:32 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:4575 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236020AbhEUQc2 (ORCPT ); Fri, 21 May 2021 12:32:28 -0400 Received: from dggems701-chm.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FmsV52nN2zsSbs; Sat, 22 May 2021 00:28:13 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by dggems701-chm.china.huawei.com (10.3.19.178) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Sat, 22 May 2021 00:31:00 +0800 Received: from localhost (10.52.125.126) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 21 May 2021 17:30:58 +0100 Date: Fri, 21 May 2021 17:29:11 +0100 From: Jonathan Cameron To: Oleksij Rempel CC: Dmitry Torokhov , Rob Herring , Rob Herring , , , , David Jander , Subject: Re: [PATCH v5 5/8] dt-bindings: touchscreen: Convert resistive-adc-touch binding to json schema Message-ID: <20210521172911.00001624@Huawei.com> In-Reply-To: <20210521044525.7397-6-o.rempel@pengutronix.de> References: <20210521044525.7397-1-o.rempel@pengutronix.de> <20210521044525.7397-6-o.rempel@pengutronix.de> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.52.125.126] X-ClientProxiedBy: lhreml746-chm.china.huawei.com (10.201.108.196) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 May 2021 06:45:22 +0200 Oleksij Rempel wrote: > Convert the resistive-adc-touch binding to DT schema format using json-schema. > > Signed-off-by: Oleksij Rempel > Reviewed-by: Rob Herring Looks good to me. Reviewed-by: Jonathan Cameron > --- > .../input/touchscreen/resistive-adc-touch.txt | 33 --------- > .../touchscreen/resistive-adc-touch.yaml | 70 +++++++++++++++++++ > 2 files changed, 70 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..38b4cbee9429 > --- /dev/null > +++ b/Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.yaml > @@ -0,0 +1,70 @@ > +# 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 > + items: > + - description: x > + - description: y > + - description: pressure (optional) > + > + io-channel-names: > + oneOf: > + - items: > + - enum: [x, y] > + - enum: [x, y] > + - items: > + - enum: [x, y, pressure] > + - enum: [x, y, pressure] > + - enum: [x, y, 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: > + - | > + touchscreen { > + compatible = "resistive-adc-touch"; > + io-channels = <&adc 24>, <&adc 25>; > + io-channel-names = "y", "x"; > + }; > + - | > + touchscreen { > + compatible = "resistive-adc-touch"; > + touchscreen-min-pressure = <50000>; > + io-channels = <&adc 24>, <&adc 25>, <&adc 26>; > + io-channel-names = "y", "pressure", "x"; > + };