linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michal Vokáč" <michal.vokac@ysoft.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Rob Herring <robh+dt@kernel.org>
Cc: "Shawn Guo" <shawnguo@kernel.org>,
	"Fabio Estevam" <festevam@gmail.com>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	"Michal Vokáč" <michal.vokac@ysoft.com>
Subject: [PATCH v3 1/5] dt-bindings: input: Add common input binding in json-schema
Date: Thu,  3 Oct 2019 08:12:52 +0200	[thread overview]
Message-ID: <1570083176-8231-2-git-send-email-michal.vokac@ysoft.com> (raw)
In-Reply-To: <1570083176-8231-1-git-send-email-michal.vokac@ysoft.com>

Create schema for the common input properties and merge all properties
from the Documentation/devicetree/bindings/input/keys.txt binding into
this common schema.

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
---
Changes since v2:
 - Merge content of keys.txt binding inti this schema.

Changes since v1:
 - New patch in the series.

 Documentation/devicetree/bindings/input/input.yaml | 32 ++++++++++++++++++++++
 Documentation/devicetree/bindings/input/keys.txt   |  8 ------
 .../devicetree/bindings/input/mtk-pmic-keys.txt    |  4 +--
 .../devicetree/bindings/input/st,stpmic1-onkey.txt |  2 +-
 4 files changed, 35 insertions(+), 11 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/input/input.yaml
 delete mode 100644 Documentation/devicetree/bindings/input/keys.txt

diff --git a/Documentation/devicetree/bindings/input/input.yaml b/Documentation/devicetree/bindings/input/input.yaml
new file mode 100644
index 000000000000..ca8fe84a2e62
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/input.yaml
@@ -0,0 +1,32 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/input.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common input schema binding
+
+maintainers:
+  - Dmitry Torokhov <dmitry.torokhov@gmail.com>
+
+properties:
+  autorepeat:
+    description: Enable autorepeat when key is pressed and held down.
+    type: boolean
+
+  linux,keycodes:
+    description:
+      Specifies an array of numeric keycode values to be used for reporting
+      button presses.
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32-array
+      - items:
+          minimum: 0
+          maximum: 0xff
+
+  power-off-time-sec:
+    description:
+      Duration in seconds which the key should be kept pressed for device to
+      power off automatically. Device with key pressed shutdown feature can
+      specify this property.
+    $ref: /schemas/types.yaml#/definitions/uint32
diff --git a/Documentation/devicetree/bindings/input/keys.txt b/Documentation/devicetree/bindings/input/keys.txt
deleted file mode 100644
index f5a5ddde53f1..000000000000
--- a/Documentation/devicetree/bindings/input/keys.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-General Keys Properties:
-
-Optional properties for Keys:
-- power-off-time-sec: Duration in seconds which the key should be kept
-	pressed for device to power off automatically. Device with key pressed
-	shutdown feature can specify this property.
-- linux,keycodes: Specifies the numeric keycode values to be used for
-	reporting key presses.
diff --git a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
index 2888d07c2ef0..535d92885372 100644
--- a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
+++ b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
@@ -10,13 +10,13 @@ Documentation/devicetree/bindings/mfd/mt6397.txt
 
 Required properties:
 - compatible: "mediatek,mt6397-keys" or "mediatek,mt6323-keys"
-- linux,keycodes: See Documentation/devicetree/bindings/input/keys.txt
+- linux,keycodes: See Documentation/devicetree/bindings/input/input.yaml
 
 Optional Properties:
 - wakeup-source: See Documentation/devicetree/bindings/power/wakeup-source.txt
 - mediatek,long-press-mode: Long press key shutdown setting, 1 for
 	pwrkey only, 2 for pwrkey/homekey together, others for disabled.
-- power-off-time-sec: See Documentation/devicetree/bindings/input/keys.txt
+- power-off-time-sec: See Documentation/devicetree/bindings/input/input.yaml
 
 Example:
 
diff --git a/Documentation/devicetree/bindings/input/st,stpmic1-onkey.txt b/Documentation/devicetree/bindings/input/st,stpmic1-onkey.txt
index 4494613ae7ad..eb8e83736c02 100644
--- a/Documentation/devicetree/bindings/input/st,stpmic1-onkey.txt
+++ b/Documentation/devicetree/bindings/input/st,stpmic1-onkey.txt
@@ -15,7 +15,7 @@ Optional properties:
 - st,onkey-pu-inactive: onkey pull up is not active
 - power-off-time-sec: Duration in seconds which the key should be kept
         pressed for device to power off automatically (from 1 to 16 seconds).
-        see See Documentation/devicetree/bindings/input/keys.txt
+        see See Documentation/devicetree/bindings/input/input.yaml
 
 Example:
 
-- 
2.1.4


  reply	other threads:[~2019-10-03  6:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03  6:12 [PATCH v3 0/5] Add polling mode to the MPR121 touchkey Michal Vokáč
2019-10-03  6:12 ` Michal Vokáč [this message]
2019-10-10 19:35   ` [PATCH v3 1/5] dt-bindings: input: Add common input binding in json-schema Rob Herring
2019-10-16  0:23     ` Dmitry Torokhov
2019-10-03  6:12 ` [PATCH v3 2/5] dt-bindings: input: Convert mpr121 binding to json-schema Michal Vokáč
2019-10-04 13:58   ` Michal Vokáč
2019-10-10 19:36   ` Rob Herring
2019-10-16  0:24     ` Dmitry Torokhov
2019-10-03  6:12 ` [PATCH v3 3/5] dt-bindings: input: Add poll-interval property Michal Vokáč
2019-10-10 19:40   ` Rob Herring
2019-10-10 20:01     ` Dmitry Torokhov
2019-10-11  8:03       ` Michal Vokáč
2019-10-16  0:23         ` Dmitry Torokhov
2019-10-16  5:52           ` Michal Vokáč
2019-10-03  6:12 ` [PATCH v3 4/5] Input: mpr121: Add polling mode Michal Vokáč
2019-10-16  0:24   ` Dmitry Torokhov
2019-10-03  6:12 ` [PATCH v3 5/5] ARM: dts: imx6dl-yapp4: Enable the MPR121 touchkey controller on Hydra Michal Vokáč
2019-10-16  6:07   ` Michal Vokáč
2019-10-25  2:48     ` Shawn Guo

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=1570083176-8231-2-git-send-email-michal.vokac@ysoft.com \
    --to=michal.vokac@ysoft.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=festevam@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    /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).