Skip to content

Commit 75448ff

Browse files
robherringdtor
authored andcommitted
dt-bindings: input: Centralize 'linux,input-type' definition
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 <[email protected]> Acked-by: Jeff LaBundy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent d853cec commit 75448ff

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,6 @@ patternProperties:
467467
linux,code: true
468468

469469
linux,input-type:
470-
$ref: /schemas/types.yaml#/definitions/uint32
471470
enum: [1, 5]
472471
default: 1
473472
description:

Documentation/devicetree/bindings/input/gpio-keys.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,7 @@ patternProperties:
3636
description: Key / Axis code to emit.
3737

3838
linux,input-type:
39-
description:
40-
Specify event type this button/key generates. If not specified defaults to
41-
<1> == EV_KEY.
42-
$ref: /schemas/types.yaml#/definitions/uint32
43-
44-
default: 1
39+
default: 1 # EV_KEY
4540

4641
linux,input-value:
4742
description: |

Documentation/devicetree/bindings/input/input.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ properties:
3131
$ref: /schemas/types.yaml#/definitions/uint32
3232
maximum: 0x2ff
3333

34+
linux,input-type:
35+
$ref: /schemas/types.yaml#/definitions/uint32
36+
enum:
37+
- 1 # EV_KEY
38+
- 2 # EV_REL
39+
- 3 # EV_ABS
40+
- 5 # EV_SW
41+
description:
42+
Specifies whether the event is to be interpreted as a key, relative,
43+
absolute, or switch.
44+
3445
poll-interval:
3546
description: Poll interval time in milliseconds.
3647
$ref: /schemas/types.yaml#/definitions/uint32
@@ -47,4 +58,7 @@ properties:
4758
reset automatically. Device with key pressed reset feature can specify
4859
this property.
4960

61+
dependencies:
62+
linux,input-type: [ "linux,code" ]
63+
5064
additionalProperties: true

Documentation/devicetree/bindings/input/iqs626a.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -491,16 +491,12 @@ patternProperties:
491491
linux,code: true
492492

493493
linux,input-type:
494-
$ref: /schemas/types.yaml#/definitions/uint32
495494
enum: [1, 5]
496495
description:
497496
Specifies whether the event is to be interpreted as a key (1) or
498497
a switch (5). By default, Hall-channel events are interpreted as
499498
switches and all others are interpreted as keys.
500499

501-
dependencies:
502-
linux,input-type: ["linux,code"]
503-
504500
additionalProperties: false
505501

506502
dependencies:

0 commit comments

Comments
 (0)