Skip to content

Commit 005d467

Browse files
krzkdtor
authored andcommitted
dt-bindings: input: gpio-keys: reference input.yaml and document properties
The original text bindings documented "autorepeat" and "label" properties (in the device node, beside the nodes with keys). DTS use also poll-interval. Reference the input.yaml to get these top-level properties. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 5eb5652 commit 005d467

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

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

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ properties:
1515
- gpio-keys
1616
- gpio-keys-polled
1717

18+
autorepeat: true
19+
20+
label:
21+
description: Name of entire device
22+
23+
poll-interval: true
24+
1825
patternProperties:
1926
"^(button|event|key|switch|(button|event|key|switch)-[a-z0-9-]+|[a-z0-9-]+-(button|event|key|switch))$":
2027
$ref: input.yaml#
@@ -94,19 +101,18 @@ patternProperties:
94101

95102
unevaluatedProperties: false
96103

97-
if:
98-
properties:
99-
compatible:
100-
const: gpio-keys-polled
101-
then:
102-
properties:
103-
poll-interval:
104-
description:
105-
Poll interval time in milliseconds
106-
$ref: /schemas/types.yaml#/definitions/uint32
107-
108-
required:
109-
- poll-interval
104+
allOf:
105+
- $ref: input.yaml#
106+
- if:
107+
properties:
108+
compatible:
109+
const: gpio-keys-polled
110+
then:
111+
required:
112+
- poll-interval
113+
else:
114+
properties:
115+
poll-interval: false
110116

111117
additionalProperties: false
112118

0 commit comments

Comments
 (0)