[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200330191135.GA22010@bogus>
Date: Mon, 30 Mar 2020 13:11:35 -0600
From: Rob Herring <robh@...nel.org>
To: Paul Cercueil <paul@...pouillou.net>
Cc: Nick Dyer <nick@...anahar.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Mark Rutland <mark.rutland@....com>,
linux-input@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: input: Update atmel,maxtouch.txt to YAML
On Sun, Mar 15, 2020 at 11:04:15AM +0100, Paul Cercueil wrote:
> Update atmel,maxtouch.txt to YAML. The new 'vdd-supply' property was
> added in the process.
>
> Signed-off-by: Paul Cercueil <paul@...pouillou.net>
> ---
> .../bindings/input/atmel,maxtouch.txt | 41 -----------
> .../bindings/input/atmel,maxtouch.yaml | 68 +++++++++++++++++++
> 2 files changed, 68 insertions(+), 41 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.txt
> create mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
>
> 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
> - <dt-bindings/input/input.h>.
> -
> - 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 = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
> - };
> diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
> new file mode 100644
> index 000000000000..1b138a9836bf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
> @@ -0,0 +1,68 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Do you have rights to relicense?
> +%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 DT bindings
> +
> +maintainers:
> + - Paul Cercueil <paul@...pouillou.net>
> +
> +properties:
> + compatible:
> + enum:
> + - atmel,maxtouch
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + vdd-supply:
> + description: Phandle to regulator providing power to the touchscreen
> +
> + linux,gpio-keymap:
> + minItems: 1
> + maxItems: 8
Needs a type reference (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
> + <dt-bindings/input/input.h>.
> +
> + 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:
> + description: GPIO specifier for the touchscreen's reset pin (active low)
maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + mxt224-touchscreen@4a {
touchscreen@4a
> + compatible = "atmel,maxtouch";
> + reg = <0x4a>;
> +
> + interrupt-parent = <&gpx0>;
> + interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
> +
> + vdd-supply = <&tsp_reg>;
> + };
> + };
> --
> 2.25.1
>
Powered by blists - more mailing lists