All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Rob Herring <robh+dt@kernel.org>, Rob Herring <robh@kernel.org>,
	<kernel@pengutronix.de>, <linux-kernel@vger.kernel.org>,
	<linux-input@vger.kernel.org>, David Jander <david@protonic.nl>,
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH v5 5/8] dt-bindings: touchscreen: Convert resistive-adc-touch binding to json schema
Date: Fri, 21 May 2021 17:29:11 +0100	[thread overview]
Message-ID: <20210521172911.00001624@Huawei.com> (raw)
In-Reply-To: <20210521044525.7397-6-o.rempel@pengutronix.de>

On Fri, 21 May 2021 06:45:22 +0200
Oleksij Rempel <o.rempel@pengutronix.de> wrote:

> Convert the resistive-adc-touch binding to DT schema format using json-schema.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> Reviewed-by: Rob Herring <robh@kernel.org>
Looks good to me.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  .../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 <o.rempel@pengutronix.de>
> +
> +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";
> +    };


  reply	other threads:[~2021-05-21 16:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21  4:45 [PATCH v5 0/8] add z1 and z2 channels support for resistive-adc-touch driver Oleksij Rempel
2021-05-21  4:45 ` [PATCH v5 1/8] dt-bindings: input: touchscreen: iqs626a: chnage node name to pass validation Oleksij Rempel
2021-05-21 16:26   ` Jonathan Cameron
2021-05-21 17:08   ` Rob Herring
2021-05-23  3:09     ` Jeff LaBundy
2021-05-21  4:45 ` [PATCH v5 2/8] dt-bindings: input: touchscreen: edt-ft5x06: " Oleksij Rempel
2021-05-21 17:09   ` Rob Herring
2021-05-21  4:45 ` [PATCH v5 3/8] dt-bindings: input: touchscreen: goodix: " Oleksij Rempel
2021-05-21 17:17   ` Rob Herring
2021-05-21  4:45 ` [PATCH v5 4/8] dt-bindings: touchscreen: validate nodename Oleksij Rempel
2021-05-21 16:27   ` Jonathan Cameron
2021-05-21 17:18   ` Rob Herring
2021-05-25  3:46     ` Dmitry Torokhov
2021-05-21  4:45 ` [PATCH v5 5/8] dt-bindings: touchscreen: Convert resistive-adc-touch binding to json schema Oleksij Rempel
2021-05-21 16:29   ` Jonathan Cameron [this message]
2021-05-21  4:45 ` [PATCH v5 6/8] dt-bindings: touchscreen: add touchscreen-x/y-plate-ohms property Oleksij Rempel
2021-05-21  4:45 ` [PATCH v5 7/8] dt-bindings: touchscreen: resistive-adc-touch: add support for z1 and z2 channels Oleksij Rempel
2021-05-21  4:45 ` [PATCH v5 8/8] Input: " Oleksij Rempel
2021-05-21 16:40   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210521172911.00001624@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=david@protonic.nl \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.