summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2022-07-05 14:03:55 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2022-07-08 15:22:20 -0700
commit005d4674ed3d3d5c1a4c288c2486c8e9949dbb01 (patch)
tree2ba9e181b8c86a76a669860f22c97a3e94266f97
parent5eb5652250e489fdcb31b46cc898e5f848b96d05 (diff)
downloadlwn-005d4674ed3d3d5c1a4c288c2486c8e9949dbb01.tar.gz
lwn-005d4674ed3d3d5c1a4c288c2486c8e9949dbb01.zip
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 <krzysztof.kozlowski@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220705120356.94876-3-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--Documentation/devicetree/bindings/input/gpio-keys.yaml32
1 files changed, 19 insertions, 13 deletions
diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml
index 27bb5c6ab8d9..e722e681d237 100644
--- a/Documentation/devicetree/bindings/input/gpio-keys.yaml
+++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml
@@ -15,6 +15,13 @@ properties:
- gpio-keys
- gpio-keys-polled
+ autorepeat: true
+
+ label:
+ description: Name of entire device
+
+ poll-interval: true
+
patternProperties:
"^(button|event|key|switch|(button|event|key|switch)-[a-z0-9-]+|[a-z0-9-]+-(button|event|key|switch))$":
$ref: input.yaml#
@@ -94,19 +101,18 @@ patternProperties:
unevaluatedProperties: false
-if:
- properties:
- compatible:
- const: gpio-keys-polled
-then:
- properties:
- poll-interval:
- description:
- Poll interval time in milliseconds
- $ref: /schemas/types.yaml#/definitions/uint32
-
- required:
- - poll-interval
+allOf:
+ - $ref: input.yaml#
+ - if:
+ properties:
+ compatible:
+ const: gpio-keys-polled
+ then:
+ required:
+ - poll-interval
+ else:
+ properties:
+ poll-interval: false
additionalProperties: false