On 01. 10. 19 17:03, Rob Herring wrote:
On Tue, Oct 1, 2019 at 9:29 AM Michal Vokáč <michal.vokac@xxxxxxxxx> wrote:
Create schema for the common input properties.
Signed-off-by: Michal Vokáč <michal.vokac@xxxxxxxxx>
---
Changes since v1:
- New patch in the series.
Rob, you suggested to extract the common properties from
fsl,mpr121-touchkey.yaml into this file. In the meantime I realized that
the linux,keycodes property is already documented in keys.txt.
What do you suggest to do? Some possible options:
- Just remove the linux,keycodes propery from keys.txt.
- Merge this input.yaml with all content of keys.txt. How to name the result?
Yes. input.yaml is fine. Looks like there's only 3 references to
keys.txt to update.
OK.
Thanks for mentioning the references, I would surely forget to update those.
- Something else?
Documentation/devicetree/bindings/input/input.yaml | 25 ++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/input.yaml
diff --git a/Documentation/devicetree/bindings/input/input.yaml b/Documentation/devicetree/bindings/input/input.yaml
new file mode 100644
index 000000000000..494e7d031ea3
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/input.yaml
@@ -0,0 +1,25 @@
+# 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@xxxxxxxxx>
+
+properties:
+ linux,keycodes:
+ description:
+ Specifies an array of numeric keycode values to be used for reporting
+ button presses. The array can contain up to 12 entries.
12 is specific to your device.
Sure, I will remove this.
I also had question in patch 2/5 regarding the additional minItems and
maxItems constrains. I tried various methods to add the constrains but
all fail to pass the validation with the same error message.
Thanks a lot,
Michal
+ allOf:
+ - $ref: /schemas/types.yaml#/definitions/uint32-array
+ - items:
+ minimum: 0
+ maximum: 0xff
+
+ autorepeat:
+ description: Enable autorepeat when key is pressed and held down.
+ type: boolean
--
2.1.4