Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: input: Add common input binding in json-schema

Create schema for the common input properties and merge all properties
from the Documentation/devicetree/bindings/input/keys.txt binding into
this common schema.

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Michal Vokáč and committed by
Dmitry Torokhov
7cef1079 792e154c

+35 -11
+32
Documentation/devicetree/bindings/input/input.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/input/input.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Common input schema binding 8 + 9 + maintainers: 10 + - Dmitry Torokhov <dmitry.torokhov@gmail.com> 11 + 12 + properties: 13 + autorepeat: 14 + description: Enable autorepeat when key is pressed and held down. 15 + type: boolean 16 + 17 + linux,keycodes: 18 + description: 19 + Specifies an array of numeric keycode values to be used for reporting 20 + button presses. 21 + allOf: 22 + - $ref: /schemas/types.yaml#/definitions/uint32-array 23 + - items: 24 + minimum: 0 25 + maximum: 0xff 26 + 27 + power-off-time-sec: 28 + description: 29 + Duration in seconds which the key should be kept pressed for device to 30 + power off automatically. Device with key pressed shutdown feature can 31 + specify this property. 32 + $ref: /schemas/types.yaml#/definitions/uint32
-8
Documentation/devicetree/bindings/input/keys.txt
··· 1 - General Keys Properties: 2 - 3 - Optional properties for Keys: 4 - - power-off-time-sec: Duration in seconds which the key should be kept 5 - pressed for device to power off automatically. Device with key pressed 6 - shutdown feature can specify this property. 7 - - linux,keycodes: Specifies the numeric keycode values to be used for 8 - reporting key presses.
+2 -2
Documentation/devicetree/bindings/input/mtk-pmic-keys.txt
··· 10 10 11 11 Required properties: 12 12 - compatible: "mediatek,mt6397-keys" or "mediatek,mt6323-keys" 13 - - linux,keycodes: See Documentation/devicetree/bindings/input/keys.txt 13 + - linux,keycodes: See Documentation/devicetree/bindings/input/input.yaml 14 14 15 15 Optional Properties: 16 16 - wakeup-source: See Documentation/devicetree/bindings/power/wakeup-source.txt 17 17 - mediatek,long-press-mode: Long press key shutdown setting, 1 for 18 18 pwrkey only, 2 for pwrkey/homekey together, others for disabled. 19 - - power-off-time-sec: See Documentation/devicetree/bindings/input/keys.txt 19 + - power-off-time-sec: See Documentation/devicetree/bindings/input/input.yaml 20 20 21 21 Example: 22 22
+1 -1
Documentation/devicetree/bindings/input/st,stpmic1-onkey.txt
··· 15 15 - st,onkey-pu-inactive: onkey pull up is not active 16 16 - power-off-time-sec: Duration in seconds which the key should be kept 17 17 pressed for device to power off automatically (from 1 to 16 seconds). 18 - see See Documentation/devicetree/bindings/input/keys.txt 18 + see See Documentation/devicetree/bindings/input/input.yaml 19 19 20 20 Example: 21 21