diff mbox series

[1/3] devicetree/bindings: Initial commit of wacom,wacom-i2c

Message ID 20210117042428.1497-1-alistair@alistair23.me
State New
Headers show
Series [1/3] devicetree/bindings: Initial commit of wacom,wacom-i2c | expand

Commit Message

Alistair Jan. 17, 2021, 4:24 a.m. UTC
Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
 .../input/touchscreen/wacom,wacom-i2c.yaml    | 55 +++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |  2 +
 2 files changed, 57 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/wacom,wacom-i2c.yaml

Comments

Dmitry Torokhov Jan. 20, 2021, 2:15 a.m. UTC | #1
Hi Alistair,

On Sat, Jan 16, 2021 at 08:24:26PM -0800, Alistair Francis wrote:
> Signed-off-by: Alistair Francis <alistair@alistair23.me>

> ---

>  .../input/touchscreen/wacom,wacom-i2c.yaml    | 55 +++++++++++++++++++

>  .../devicetree/bindings/vendor-prefixes.yaml  |  2 +

>  2 files changed, 57 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/input/touchscreen/wacom,wacom-i2c.yaml

> 

> diff --git a/Documentation/devicetree/bindings/input/touchscreen/wacom,wacom-i2c.yaml b/Documentation/devicetree/bindings/input/touchscreen/wacom,wacom-i2c.yaml

> new file mode 100644

> index 000000000000..6b0e0034f836

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/input/touchscreen/wacom,wacom-i2c.yaml

> @@ -0,0 +1,55 @@

> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

> +%YAML 1.2

> +---

> +$id: http://devicetree.org/schemas/input/touchscreen/wacom,wacom-i2c.yaml#

> +$schema: http://devicetree.org/meta-schemas/core.yaml#

> +

> +title: Wacom I2C Controller

> +

> +maintainers:

> +  - Alistair Francis <alistair@alistair23.me>

> +

> +allOf:

> +  - $ref: touchscreen.yaml#

> +

> +properties:

> +  compatible:

> +    const: wacom,wacom-i2c

> +

> +  reg:

> +    maxItems: 1

> +

> +  interrupts:

> +    maxItems: 1

> +

> +  flip-tilt-x:

> +  flip-tilt-y:


Does the device support tilt? The driver does not, at least at the
moment. Also, does it make sense to flip tilt but not position?

> +  flip-pos-x:

> +  flip-pos-y:


This needs to use standard touchscreen properties. See
Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml

> +  flip-distance:


I am having trouble understanding when this one would be useful.

> +

> +required:

> +  - compatible

> +  - reg

> +  - interrupts

> +

> +additionalProperties: false

> +

> +examples:

> +  - |

> +    #include "dt-bindings/interrupt-controller/irq.h"

> +    i2c {

> +        #address-cells = <1>;

> +        #size-cells = <0>;

> +        digitiser@9 {

> +                compatible = "wacom,wacom-i2c";

> +                reg = <0x9>;

> +                interrupt-parent = <&gpio1>;

> +                interrupts = <9 IRQ_TYPE_LEVEL_LOW>;

> +                flip-tilt-x;

> +                flip-tilt-y;

> +                flip-pos-x;

> +                flip-pos-y;

> +                flip-distance;

> +        };

> +    };

> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml

> index 041ae90b0d8f..5bca22f035a3 100644

> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml

> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml

> @@ -1202,6 +1202,8 @@ patternProperties:

>      description: Vision Optical Technology Co., Ltd.

>    "^vxt,.*":

>      description: VXT Ltd

> +  "^wacom,.*":

> +    description: Wacom Co., Ltd

>    "^wand,.*":

>      description: Wandbord (Technexion)

>    "^waveshare,.*":

> -- 

> 2.29.2

> 


Thanks.

-- 
Dmitry
Dmitry Torokhov Jan. 20, 2021, 2:17 a.m. UTC | #2
On Sat, Jan 16, 2021 at 08:24:27PM -0800, Alistair Francis wrote:
> Allow the wacom-i2c device to be exposed via device tree.


The patch seems incomplete. I see we are reading and storing properties,
but we are not using them whatsoever, so I do not see the reason to have
this in this form.

Thanks.

-- 
Dmitry
Alistair Francis Jan. 20, 2021, 6:15 a.m. UTC | #3
On Tue, Jan 19, 2021 at 6:15 PM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>

> Hi Alistair,

>

> On Sat, Jan 16, 2021 at 08:24:26PM -0800, Alistair Francis wrote:

> > Signed-off-by: Alistair Francis <alistair@alistair23.me>

> > ---

> >  .../input/touchscreen/wacom,wacom-i2c.yaml    | 55 +++++++++++++++++++

> >  .../devicetree/bindings/vendor-prefixes.yaml  |  2 +

> >  2 files changed, 57 insertions(+)

> >  create mode 100644 Documentation/devicetree/bindings/input/touchscreen/wacom,wacom-i2c.yaml

> >

> > diff --git a/Documentation/devicetree/bindings/input/touchscreen/wacom,wacom-i2c.yaml b/Documentation/devicetree/bindings/input/touchscreen/wacom,wacom-i2c.yaml

> > new file mode 100644

> > index 000000000000..6b0e0034f836

> > --- /dev/null

> > +++ b/Documentation/devicetree/bindings/input/touchscreen/wacom,wacom-i2c.yaml

> > @@ -0,0 +1,55 @@

> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

> > +%YAML 1.2

> > +---

> > +$id: http://devicetree.org/schemas/input/touchscreen/wacom,wacom-i2c.yaml#

> > +$schema: http://devicetree.org/meta-schemas/core.yaml#

> > +

> > +title: Wacom I2C Controller

> > +

> > +maintainers:

> > +  - Alistair Francis <alistair@alistair23.me>

> > +

> > +allOf:

> > +  - $ref: touchscreen.yaml#

> > +

> > +properties:

> > +  compatible:

> > +    const: wacom,wacom-i2c

> > +

> > +  reg:

> > +    maxItems: 1

> > +

> > +  interrupts:

> > +    maxItems: 1

> > +

> > +  flip-tilt-x:

> > +  flip-tilt-y:

>

> Does the device support tilt? The driver does not, at least at the

> moment. Also, does it make sense to flip tilt but not position?

>

> > +  flip-pos-x:

> > +  flip-pos-y:

>

> This needs to use standard touchscreen properties. See

> Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml

>

> > +  flip-distance:

>

> I am having trouble understanding when this one would be useful.


Thanks for the review. These came from the original out of tree DT. I
have removed them, I'm planning on using the standard touchscreen ones
you pointed out if they are required.

Alistair

>

> > +

> > +required:

> > +  - compatible

> > +  - reg

> > +  - interrupts

> > +

> > +additionalProperties: false

> > +

> > +examples:

> > +  - |

> > +    #include "dt-bindings/interrupt-controller/irq.h"

> > +    i2c {

> > +        #address-cells = <1>;

> > +        #size-cells = <0>;

> > +        digitiser@9 {

> > +                compatible = "wacom,wacom-i2c";

> > +                reg = <0x9>;

> > +                interrupt-parent = <&gpio1>;

> > +                interrupts = <9 IRQ_TYPE_LEVEL_LOW>;

> > +                flip-tilt-x;

> > +                flip-tilt-y;

> > +                flip-pos-x;

> > +                flip-pos-y;

> > +                flip-distance;

> > +        };

> > +    };

> > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml

> > index 041ae90b0d8f..5bca22f035a3 100644

> > --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml

> > +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml

> > @@ -1202,6 +1202,8 @@ patternProperties:

> >      description: Vision Optical Technology Co., Ltd.

> >    "^vxt,.*":

> >      description: VXT Ltd

> > +  "^wacom,.*":

> > +    description: Wacom Co., Ltd

> >    "^wand,.*":

> >      description: Wandbord (Technexion)

> >    "^waveshare,.*":

> > --

> > 2.29.2

> >

>

> Thanks.

>

> --

> Dmitry
Alistair Francis Jan. 21, 2021, 6:51 a.m. UTC | #4
On Tue, Jan 19, 2021 at 6:17 PM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>

> On Sat, Jan 16, 2021 at 08:24:27PM -0800, Alistair Francis wrote:

> > Allow the wacom-i2c device to be exposed via device tree.

>

> The patch seems incomplete. I see we are reading and storing properties,

> but we are not using them whatsoever, so I do not see the reason to have

> this in this form.


Good point. I am trying to split up the work, but I guess here I split
it up a little too much. I'm sending a v2 that should fix this.

Alistair

>

> Thanks.

>

> --

> Dmitry
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/input/touchscreen/wacom,wacom-i2c.yaml b/Documentation/devicetree/bindings/input/touchscreen/wacom,wacom-i2c.yaml
new file mode 100644
index 000000000000..6b0e0034f836
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/wacom,wacom-i2c.yaml
@@ -0,0 +1,55 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/touchscreen/wacom,wacom-i2c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Wacom I2C Controller
+
+maintainers:
+  - Alistair Francis <alistair@alistair23.me>
+
+allOf:
+  - $ref: touchscreen.yaml#
+
+properties:
+  compatible:
+    const: wacom,wacom-i2c
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  flip-tilt-x:
+  flip-tilt-y:
+  flip-pos-x:
+  flip-pos-y:
+  flip-distance:
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    #include "dt-bindings/interrupt-controller/irq.h"
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        digitiser@9 {
+                compatible = "wacom,wacom-i2c";
+                reg = <0x9>;
+                interrupt-parent = <&gpio1>;
+                interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
+                flip-tilt-x;
+                flip-tilt-y;
+                flip-pos-x;
+                flip-pos-y;
+                flip-distance;
+        };
+    };
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 041ae90b0d8f..5bca22f035a3 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -1202,6 +1202,8 @@  patternProperties:
     description: Vision Optical Technology Co., Ltd.
   "^vxt,.*":
     description: VXT Ltd
+  "^wacom,.*":
+    description: Wacom Co., Ltd
   "^wand,.*":
     description: Wandbord (Technexion)
   "^waveshare,.*":