diff mbox series

[2/4] Documentation: DT: bindings: input: Add documentation for cyttsp5

Message ID 20211025114214.44617-3-alistair@alistair23.me (mailing list archive)
State Superseded
Headers show
Series Add support for the Cypress cyttsp5 | expand

Commit Message

Alistair Francis Oct. 25, 2021, 11:42 a.m. UTC
From: Mylène Josserand <mylene.josserand@free-electrons.com>

Add the Cypress TrueTouch Generation 5 touchscreen device tree bindings
documentation. It can use I2C or SPI bus.
This touchscreen can handle some defined zone that are designed and
sent as button. To be able to customize the keycode sent, the
"linux,code" property in a "button" sub-node can be used.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Message-Id: <20170529144538.29187-3-mylene.josserand@free-electrons.com>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
 .../input/touchscreen/cypress,cyttsp5.yaml    | 72 +++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/cypress,cyttsp5.yaml

Comments

Rob Herring Oct. 25, 2021, 6:16 p.m. UTC | #1
On Mon, 25 Oct 2021 21:42:12 +1000, Alistair Francis wrote:
> From: Mylène Josserand <mylene.josserand@free-electrons.com>
> 
> Add the Cypress TrueTouch Generation 5 touchscreen device tree bindings
> documentation. It can use I2C or SPI bus.
> This touchscreen can handle some defined zone that are designed and
> sent as button. To be able to customize the keycode sent, the
> "linux,code" property in a "button" sub-node can be used.
> 
> Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
> Message-Id: <20170529144538.29187-3-mylene.josserand@free-electrons.com>
> Signed-off-by: Alistair Francis <alistair@alistair23.me>
> ---
>  .../input/touchscreen/cypress,cyttsp5.yaml    | 72 +++++++++++++++++++
>  1 file changed, 72 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/input/touchscreen/cypress,cyttsp5.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/input/touchscreen/cypress,cyttsp5.example.dts:29.35-36 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:385: Documentation/devicetree/bindings/input/touchscreen/cypress,cyttsp5.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1441: dt_binding_check] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1545697

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
Linus Walleij Oct. 25, 2021, 11:18 p.m. UTC | #2
Hi Alistair,

On Mon, Oct 25, 2021 at 1:42 PM Alistair Francis <alistair@alistair23.me> wrote:

> From: Mylène Josserand <mylene.josserand@free-electrons.com>
>
> Add the Cypress TrueTouch Generation 5 touchscreen device tree bindings
> documentation. It can use I2C or SPI bus.
> This touchscreen can handle some defined zone that are designed and
> sent as button. To be able to customize the keycode sent, the
> "linux,code" property in a "button" sub-node can be used.
>
> Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
> Message-Id: <20170529144538.29187-3-mylene.josserand@free-electrons.com>
> Signed-off-by: Alistair Francis <alistair@alistair23.me>

> +title: Cypress cyttsp touchscreen controller, generation 5
(...)
> +  compatible:
> +    const: cypress,cyttsp5

Is this the real product name? When I rewrote the bindings for
the original "CYTTSP", actually "Cypress TrueTouch Standard Product"
it came out that the actual product names were CY8CTMA340
and CY8CTMA341. "CYTTSP" was a marketing name for the
whole family.

See
Documentation/devicetree/bindings/input/touchscreen/cypress,cy8ctma340.yaml

If the actual products have some product names such as
CY8* then use these as compatibles instead and just write in the
decription that it is Cypress TrueTouch Standard Product series 5.

Yours,
Linus Walleij
Andreas Kemnade Oct. 26, 2021, 7:16 a.m. UTC | #3
On Tue, 26 Oct 2021 01:18:24 +0200
Linus Walleij <linus.walleij@linaro.org> wrote:

> Hi Alistair,
> 
> On Mon, Oct 25, 2021 at 1:42 PM Alistair Francis <alistair@alistair23.me> wrote:
> 
> > From: Mylène Josserand <mylene.josserand@free-electrons.com>
> >
> > Add the Cypress TrueTouch Generation 5 touchscreen device tree bindings
> > documentation. It can use I2C or SPI bus.
> > This touchscreen can handle some defined zone that are designed and
> > sent as button. To be able to customize the keycode sent, the
> > "linux,code" property in a "button" sub-node can be used.
> >
> > Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
> > Message-Id: <20170529144538.29187-3-mylene.josserand@free-electrons.com>
> > Signed-off-by: Alistair Francis <alistair@alistair23.me>  
> 
> > +title: Cypress cyttsp touchscreen controller, generation 5  
> (...)
> > +  compatible:
> > +    const: cypress,cyttsp5  
> 
> Is this the real product name? When I rewrote the bindings for
> the original "CYTTSP", actually "Cypress TrueTouch Standard Product"
> it came out that the actual product names were CY8CTMA340
> and CY8CTMA341. "CYTTSP" was a marketing name for the
> whole family.
> 
> See
> Documentation/devicetree/bindings/input/touchscreen/cypress,cy8ctma340.yaml
> 
> If the actual products have some product names such as
> CY8* then use these as compatibles instead and just write in the
> decription that it is Cypress TrueTouch Standard Product series 5.
> 
Since I have uptreamed 4 devicetrees containing that touchscreen (and
marked that as todo). I tried to look it up:
https://fccid.io/NOIKBN249/Internal-Photos/Internal-Photos-3802584.pdf

Page 4 might be interesting. Something below that 3d code (zbarimg does
not recognize it) Peeling up the label reveals:
TT21000
-44LQI
1802 TWN
6491U0 (two illegible characters)

You find it in the net: 
https://www.digipart.com/part/TT21000-48LQI36T

Regards,
Andreas
Alistair Francis Oct. 27, 2021, 12:28 p.m. UTC | #4
On Tue, Oct 26, 2021 at 5:16 PM Andreas Kemnade <andreas@kemnade.info> wrote:
>
> On Tue, 26 Oct 2021 01:18:24 +0200
> Linus Walleij <linus.walleij@linaro.org> wrote:
>
> > Hi Alistair,
> >
> > On Mon, Oct 25, 2021 at 1:42 PM Alistair Francis <alistair@alistair23.me> wrote:
> >
> > > From: Mylène Josserand <mylene.josserand@free-electrons.com>
> > >
> > > Add the Cypress TrueTouch Generation 5 touchscreen device tree bindings
> > > documentation. It can use I2C or SPI bus.
> > > This touchscreen can handle some defined zone that are designed and
> > > sent as button. To be able to customize the keycode sent, the
> > > "linux,code" property in a "button" sub-node can be used.
> > >
> > > Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
> > > Message-Id: <20170529144538.29187-3-mylene.josserand@free-electrons.com>
> > > Signed-off-by: Alistair Francis <alistair@alistair23.me>
> >
> > > +title: Cypress cyttsp touchscreen controller, generation 5
> > (...)
> > > +  compatible:
> > > +    const: cypress,cyttsp5
> >
> > Is this the real product name? When I rewrote the bindings for
> > the original "CYTTSP", actually "Cypress TrueTouch Standard Product"
> > it came out that the actual product names were CY8CTMA340
> > and CY8CTMA341. "CYTTSP" was a marketing name for the
> > whole family.
> >
> > See
> > Documentation/devicetree/bindings/input/touchscreen/cypress,cy8ctma340.yaml
> >
> > If the actual products have some product names such as
> > CY8* then use these as compatibles instead and just write in the
> > decription that it is Cypress TrueTouch Standard Product series 5.
> >
> Since I have uptreamed 4 devicetrees containing that touchscreen (and
> marked that as todo). I tried to look it up:
> https://fccid.io/NOIKBN249/Internal-Photos/Internal-Photos-3802584.pdf
>
> Page 4 might be interesting. Something below that 3d code (zbarimg does
> not recognize it) Peeling up the label reveals:
> TT21000
> -44LQI
> 1802 TWN
> 6491U0 (two illegible characters)
>
> You find it in the net:
> https://www.digipart.com/part/TT21000-48LQI36T

Thanks!

So I'll change the name to cypress,tt21000

Alistair

>
> Regards,
> Andreas
>
Andreas Kemnade Oct. 31, 2021, 4:49 p.m. UTC | #5
Hi,

On Mon, 25 Oct 2021 21:42:12 +1000
Alistair Francis <alistair@alistair23.me> wrote:

> From: Mylène Josserand <mylene.josserand@free-electrons.com>
> 
> Add the Cypress TrueTouch Generation 5 touchscreen device tree bindings
> documentation. It can use I2C or SPI bus.
> This touchscreen can handle some defined zone that are designed and
> sent as button. To be able to customize the keycode sent, the
> "linux,code" property in a "button" sub-node can be used.
> 
> Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
> Message-Id: <20170529144538.29187-3-mylene.josserand@free-electrons.com>
> Signed-off-by: Alistair Francis <alistair@alistair23.me>
> ---
>  .../input/touchscreen/cypress,cyttsp5.yaml    | 72 +++++++++++++++++++
>  1 file changed, 72 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/input/touchscreen/cypress,cyttsp5.yaml
> 
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/cypress,cyttsp5.yaml b/Documentation/devicetree/bindings/input/touchscreen/cypress,cyttsp5.yaml
> new file mode 100644
> index 000000000000..0bddbd76a0c3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/touchscreen/cypress,cyttsp5.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/input/touchscreen/cypress,cyttsp5.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cypress cyttsp touchscreen controller, generation 5
> +
> +maintainers:
> +  - Alistair Francis <alistair@alistair23.me>
> +
> +allOf:
> +  - $ref: touchscreen.yaml#
> +
> +properties:
> +  compatible:
> +    const: cypress,cyttsp5
> +

you use buttons later, so it should be specified somewhere here.

> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  vdd-supply:
> +    description: Regulator for voltage.
> +
> +  reset-gpios:
> +    maxItems: 1
> +
> +  linux,code:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: EV_ABS specific event code generated by the axis.
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - vdd-supply
> +
> +additionalProperties: false
If you want to allow things from touchscreen.yaml, you should use
unevaluatedProperties: false.
> +
> +examples:
> +  - |

some includes are missing for the constants below here.
> +    i2c {

Regards,
Andreas
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/input/touchscreen/cypress,cyttsp5.yaml b/Documentation/devicetree/bindings/input/touchscreen/cypress,cyttsp5.yaml
new file mode 100644
index 000000000000..0bddbd76a0c3
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/cypress,cyttsp5.yaml
@@ -0,0 +1,72 @@ 
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/cypress,cyttsp5.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cypress cyttsp touchscreen controller, generation 5
+
+maintainers:
+  - Alistair Francis <alistair@alistair23.me>
+
+allOf:
+  - $ref: touchscreen.yaml#
+
+properties:
+  compatible:
+    const: cypress,cyttsp5
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  vdd-supply:
+    description: Regulator for voltage.
+
+  reset-gpios:
+    maxItems: 1
+
+  linux,code:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: EV_ABS specific event code generated by the axis.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - vdd-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        touchscreen@24 {
+            compatible = "cypress,cyttsp5";
+            reg = <0x24>;
+            pinctrl-names = "default";
+            pinctrl-0 = <&tp_reset_ds203>;
+            interrupt-parent = <&pio>;
+            interrupts = <1 5 IRQ_TYPE_LEVEL_LOW>;
+            reset-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
+            vdd-supply = <&reg_touch>;
+
+            button@0 {
+                linux,code = <KEY_HOMEPAGE>;
+            };
+
+            button@1 {
+                linux,code = <KEY_MENU>;
+            };
+
+            button@2 {
+                linux,code = <KEY_BACK>;
+            };
+        };
+    };
+...