diff mbox series

[v4,10/10] dt-bindings: input: touchscreen: elants_i2c: convert to YAML

Message ID 222105a9c09ac85f0c03224ef7acb8a6d6e237d5.1587916846.git.mirq-linux@rere.qmqm.pl (mailing list archive)
State Superseded
Headers show
Series input: elants: Support Asus TF300T touchscreen | expand

Commit Message

Michał Mirosław April 26, 2020, 4:11 p.m. UTC
From: David Heidelberg <david@ixit.cz>

Convert elants_i2c.txt DT binding to YAML and put into correct directory.

Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 .../devicetree/bindings/input/elants_i2c.txt  | 38 ----------
 .../input/touchscreen/elan,elants_i2c.yaml    | 69 +++++++++++++++++++
 2 files changed, 69 insertions(+), 38 deletions(-)

Comments

Rob Herring April 27, 2020, 9:14 p.m. UTC | #1
On Sun, Apr 26, 2020 at 11:11 AM Michał Mirosław
<mirq-linux@rere.qmqm.pl> wrote:
>
> From: David Heidelberg <david@ixit.cz>
>
> Convert elants_i2c.txt DT binding to YAML and put into correct directory.

Resend to the DT list or this won't be in my review queue. Looks okay
from a quick scan.

Rob
Michał Mirosław April 28, 2020, 2:08 p.m. UTC | #2
On Mon, Apr 27, 2020 at 04:14:15PM -0500, Rob Herring wrote:
> On Sun, Apr 26, 2020 at 11:11 AM Michał Mirosław
> <mirq-linux@rere.qmqm.pl> wrote:
> >
> > From: David Heidelberg <david@ixit.cz>
> >
> > Convert elants_i2c.txt DT binding to YAML and put into correct directory.
> 
> Resend to the DT list or this won't be in my review queue. Looks okay
> from a quick scan.

Hi Rob,

This is the same patch that David already sent to the list about
a week ago [1].  Do you need it resent? (Whole patchset or just the patch?)

[1] https://lore.kernel.org/linux-devicetree/20200423173253.711725-2-david@ixit.cz/

Best Regards,
Michał Mirosław
Dmitry Osipenko April 29, 2020, 1:38 a.m. UTC | #3
28.04.2020 17:08, Michał Mirosław пишет:
> On Mon, Apr 27, 2020 at 04:14:15PM -0500, Rob Herring wrote:
>> On Sun, Apr 26, 2020 at 11:11 AM Michał Mirosław
>> <mirq-linux@rere.qmqm.pl> wrote:
>>>
>>> From: David Heidelberg <david@ixit.cz>
>>>
>>> Convert elants_i2c.txt DT binding to YAML and put into correct directory.
>>
>> Resend to the DT list or this won't be in my review queue. Looks okay
>> from a quick scan.
> 
> Hi Rob,
> 
> This is the same patch that David already sent to the list about
> a week ago [1].  Do you need it resent? (Whole patchset or just the patch?)
> 
> [1] https://lore.kernel.org/linux-devicetree/20200423173253.711725-2-david@ixit.cz/

The whole patchset should be better.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/input/elants_i2c.txt b/Documentation/devicetree/bindings/input/elants_i2c.txt
deleted file mode 100644
index 1bc60303f0ea..000000000000
--- a/Documentation/devicetree/bindings/input/elants_i2c.txt
+++ /dev/null
@@ -1,38 +0,0 @@ 
-Elantech I2C Touchscreen
-
-Required properties:
-- compatible: must be "elan,ekth3500" or "elan,ektf3624".
-- reg: I2C address of the chip.
-- interrupts: interrupt to which the chip is connected (see interrupt
-  binding[0]).
-
-Optional properties:
-- wakeup-source: touchscreen can be used as a wakeup source.
-- pinctrl-names: should be "default" (see pinctrl binding [1]).
-- pinctrl-0: a phandle pointing to the pin settings for the device (see
-  pinctrl binding [1]).
-- reset-gpios: reset gpio the chip is connected to.
-- vcc33-supply: a phandle for the regulator supplying 3.3V power.
-- vccio-supply: a phandle for the regulator supplying IO power.
-- see [2] for additional properties
-
-For additional optional properties see: touchscreen.txt
-
-[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
-[1]: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
-[2]: Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt
-
-Example:
-	&i2c1 {
-		/* ... */
-
-		touchscreen@10 {
-			compatible = "elan,ekth3500";
-			reg = <0x10>;
-			interrupt-parent = <&gpio4>;
-			interrupts = <0x0 IRQ_TYPE_EDGE_FALLING>;
-			wakeup-source;
-		};
-
-		/* ... */
-	};
diff --git a/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml b/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml
new file mode 100644
index 000000000000..a792d6377b1d
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml
@@ -0,0 +1,69 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/input/touchscreen/elan,elants_i2c.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Elantech I2C Touchscreen
+
+maintainers:
+  - David Heidelberg <david@ixit.cz>
+
+allOf:
+  - $ref: touchscreen.yaml#
+
+properties:
+  compatible:
+    enum:
+      - elan,ektf3624
+      - elan,ekth3500
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  wakeup-source:
+    type: boolean
+    description: touchscreen can be used as a wakeup source.
+
+  reset-gpios:
+    description: reset gpio the chip is connected to.
+
+  vcc33-supply:
+    description: a phandle for the regulator supplying 3.3V power.
+
+  vccio-supply:
+    description: a phandle for the regulator supplying IO power.
+
+  touchscreen-inverted-x: true
+  touchscreen-inverted-y: true
+  touchscreen-size-x: true
+  touchscreen-size-y: true
+  touchscreen-swapped-x-y: true
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        touchscreen@10 {
+            compatible = "elan,ekth3500";
+            reg = <0x10>;
+
+            interrupt-parent = <&gpio4>;
+            interrupts = <0x0 IRQ_TYPE_EDGE_FALLING>;
+            wakeup-source;
+        };
+    };