linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
To: David Heidelberg <david@ixit.cz>,
	Dmitry Osipenko <digetx@gmail.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Henrik Rydberg <rydberg@bitmath.org>,
	James Chen <james.chen@emc.com.tw>,
	Johnny Chuang <johnny.chuang@emc.com.tw>,
	Rob Herring <robh+dt@kernel.org>,
	Scott Liu <scott.liu@emc.com.tw>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v4 10/10] dt-bindings: input: touchscreen: elants_i2c: convert to YAML
Date: Sun, 26 Apr 2020 18:11:17 +0200	[thread overview]
Message-ID: <222105a9c09ac85f0c03224ef7acb8a6d6e237d5.1587916846.git.mirq-linux@rere.qmqm.pl> (raw)
In-Reply-To: <cover.1587916846.git.mirq-linux@rere.qmqm.pl>

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(-)

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;
+        };
+    };
-- 
2.20.1


  parent reply	other threads:[~2020-04-26 16:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26 16:11 [PATCH v4 00/10] input: elants: Support Asus TF300T touchscreen Michał Mirosław
2020-04-26 16:11 ` [PATCH v4 02/10] input: elants: support old touch report format Michał Mirosław
2020-04-26 16:11 ` [PATCH v4 01/10] input: elants: document some registers and values Michał Mirosław
2020-04-26 16:11 ` [PATCH v4 04/10] input: elants: override touchscreen info with DT properties Michał Mirosław
2020-04-26 16:11 ` [PATCH v4 03/10] input: elants: remove unused axes Michał Mirosław
2020-04-26 16:35   ` Dmitry Osipenko
2020-04-26 17:29     ` Michał Mirosław
2020-04-26 17:45       ` Dmitry Osipenko
2020-04-26 17:58         ` Dmitry Osipenko
2020-04-26 18:15         ` Michał Mirosław
2020-04-26 16:11 ` [PATCH v4 06/10] input: elants: read touchscreen size for EKTF3624 Michał Mirosław
2020-04-26 16:11 ` [PATCH v4 05/10] input: elants: refactor elants_i2c_execute_command() Michał Mirosław
2020-04-26 16:24   ` Dmitry Osipenko
2020-04-26 17:40     ` Michał Mirosław
2020-04-26 16:11 ` [PATCH v4 07/10] input: elants: support 0x66 reply opcode for reporting touches Michał Mirosław
2020-04-26 16:11 ` [PATCH v4 08/10] dt-bindings: input: elants-i2c: Document common touchscreen properties Michał Mirosław
2020-04-26 16:11 ` [PATCH v4 09/10] dt-bindings: input: elants-i2c: Document eKTF3624 Michał Mirosław
2020-04-26 16:11 ` Michał Mirosław [this message]
2020-04-27 21:14   ` [PATCH v4 10/10] dt-bindings: input: touchscreen: elants_i2c: convert to YAML Rob Herring
2020-04-28 14:08     ` Michał Mirosław
2020-04-29  1:38       ` Dmitry Osipenko

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=222105a9c09ac85f0c03224ef7acb8a6d6e237d5.1587916846.git.mirq-linux@rere.qmqm.pl \
    --to=mirq-linux@rere.qmqm.pl \
    --cc=david@ixit.cz \
    --cc=digetx@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=james.chen@emc.com.tw \
    --cc=johnny.chuang@emc.com.tw \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=rydberg@bitmath.org \
    --cc=scott.liu@emc.com.tw \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).