From: Rob Herring <robh@kernel.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>,
Hans de Goede <hdegoede@redhat.com>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Artur Rojek <contact@artur-rojek.eu>,
Maxime Ripard <mripard@kernel.org>,
Jeff LaBundy <jeff@labundy.com>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/5] dt-bindings: input: Centralize 'linux,input-type' definition
Date: Wed, 8 Jun 2022 15:12:06 -0600 [thread overview]
Message-ID: <20220608211207.2058487-5-robh@kernel.org> (raw)
In-Reply-To: <20220608211207.2058487-1-robh@kernel.org>
Multiple bindings use 'linux,input-type', but there is not a central
definition and type. Add 'linux,input-type' to input.yaml and update all
the users to use it.
Signed-off-by: Rob Herring <robh@kernel.org>
---
.../devicetree/bindings/input/azoteq,iqs7222.yaml | 1 -
.../devicetree/bindings/input/gpio-keys.yaml | 7 +------
Documentation/devicetree/bindings/input/input.yaml | 14 ++++++++++++++
.../devicetree/bindings/input/iqs626a.yaml | 4 ----
4 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml
index 5ea10fe7ffe9..a13bd3e41dd3 100644
--- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml
+++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml
@@ -471,7 +471,6 @@ patternProperties:
linux,code: true
linux,input-type:
- $ref: /schemas/types.yaml#/definitions/uint32
enum: [1, 5]
default: 1
description:
diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
index cd07107fd5ed..6b49b1afdd95 100644
--- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
+++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
@@ -36,12 +36,7 @@ patternProperties:
description: Key / Axis code to emit.
linux,input-type:
- description:
- Specify event type this button/key generates. If not specified defaults to
- <1> == EV_KEY.
- $ref: /schemas/types.yaml#/definitions/uint32
-
- default: 1
+ default: 1 # EV_KEY
linux,input-value:
description: |
diff --git a/Documentation/devicetree/bindings/input/input.yaml b/Documentation/devicetree/bindings/input/input.yaml
index e3701a0bc500..17512f4347fd 100644
--- a/Documentation/devicetree/bindings/input/input.yaml
+++ b/Documentation/devicetree/bindings/input/input.yaml
@@ -31,6 +31,17 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
maximum: 0x2ff
+ linux,input-type:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum:
+ - 1 # EV_KEY
+ - 2 # EV_REL
+ - 3 # EV_ABS
+ - 5 # EV_SW
+ description:
+ Specifies whether the event is to be interpreted as a key, relative,
+ absolute, or switch.
+
poll-interval:
description: Poll interval time in milliseconds.
$ref: /schemas/types.yaml#/definitions/uint32
@@ -47,4 +58,7 @@ properties:
reset automatically. Device with key pressed reset feature can specify
this property.
+dependencies:
+ linux,input-type: [ "linux,code" ]
+
additionalProperties: true
diff --git a/Documentation/devicetree/bindings/input/iqs626a.yaml b/Documentation/devicetree/bindings/input/iqs626a.yaml
index 008959f2d425..4df27646c980 100644
--- a/Documentation/devicetree/bindings/input/iqs626a.yaml
+++ b/Documentation/devicetree/bindings/input/iqs626a.yaml
@@ -491,16 +491,12 @@ patternProperties:
linux,code: true
linux,input-type:
- $ref: /schemas/types.yaml#/definitions/uint32
enum: [1, 5]
description:
Specifies whether the event is to be interpreted as a key (1) or
a switch (5). By default, Hall-channel events are interpreted as
switches and all others are interpreted as keys.
- dependencies:
- linux,input-type: ["linux,code"]
-
additionalProperties: false
dependencies:
--
2.34.1
next prev parent reply other threads:[~2022-06-08 21:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 21:12 [PATCH v2 0/5] dt-bindings: input: Common property clean-ups and adc-keys conversion Rob Herring
2022-06-08 21:12 ` [PATCH v2 1/5] dt-bindings: input: Increase maximum keycode value to 0x2ff Rob Herring
2022-06-09 1:29 ` Jeff LaBundy
2022-06-09 5:46 ` Heinrich Schuchardt
2022-06-10 13:23 ` Rob Herring
2022-06-08 21:12 ` [PATCH v2 2/5] dt-bindings: input: Centralize 'linux,code' definition Rob Herring
2022-06-09 1:32 ` Jeff LaBundy
2022-06-12 16:17 ` Artur Rojek
2022-07-03 5:29 ` Samuel Holland
2022-06-08 21:12 ` [PATCH v2 3/5] dt-bindings: input: Use common 'linux,keycodes' definition Rob Herring
2022-06-09 1:34 ` Jeff LaBundy
2022-06-08 21:12 ` Rob Herring [this message]
2022-06-09 1:38 ` [PATCH v2 4/5] dt-bindings: input: Centralize 'linux,input-type' definition Jeff LaBundy
2022-06-08 21:12 ` [PATCH v2 5/5] dt-bindings: input: Convert adc-keys to DT schema Rob Herring
2022-06-09 5:49 ` Heinrich Schuchardt
2022-06-28 17:51 ` [PATCH v2 0/5] dt-bindings: input: Common property clean-ups and adc-keys conversion Rob Herring
2022-07-08 22:20 ` Dmitry Torokhov
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=20220608211207.2058487-5-robh@kernel.org \
--to=robh@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=brgl@bgdev.pl \
--cc=contact@artur-rojek.eu \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=hdegoede@redhat.com \
--cc=jeff@labundy.com \
--cc=jernej.skrabec@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=samuel@sholland.org \
--cc=wens@csie.org \
--cc=xypron.glpk@gmx.de \
/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).