dt-bindings: input: Convert gpio-keys bindings to schema
Subsystems (3)
Rob Herring
maintainerPATCH v2 1/1 dt-bindings: input: Convert gpio-keys bindings to schema
Convert the gpio-keys and gpio-keys-polled bindings to a DT schema. As both bindings are almost the same, combine them into a single schema.
The binding said 'interrupts' was required, but testing on dts files showed that it isn't required.
'linux,input-value' was only documented for gpio-keys-polled, but there doesn't seem to be any reason for it to be specific to that. It can work for gpio-keys too if the GPIO line(s) are available.
Cc Dmitry Torokhov <[email protected]>
Signed-off-by Rob Herring <[email protected]>
---
v2:
- Make 'gpios' a dependency of 'linux,input-value'
--- .../bindings/input/gpio-keys-polled.txt | 45 ------ .../devicetree/bindings/input/gpio-keys.txt | 58 ------- .../devicetree/bindings/input/gpio-keys.yaml | 152 ++++++++++++++++++ 3 files changed, 152 insertions(+), 103 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/gpio-keys-polled.txt delete mode 100644 Documentation/devicetree/bindings/input/gpio-keys.txt create mode 100644 Documentation/devicetree/bindings/input/gpio-keys.yaml
Documentation/devicetree/bindings/input/gpio-keys-polled.txt deleted +0 -45
@@ -1,45 +0,0 @@ -Device-Tree bindings for input/gpio_keys_polled.c keyboard driver - -Required properties: - - compatible = "gpio-keys-polled"; - - poll-interval: Poll interval time in milliseconds - -Optional properties: - - autorepeat: Boolean, Enable auto repeat feature of Linux input - subsystem. - -Each button (key) is represented as a sub-node of "gpio-keys-polled": -Subnode properties: - - - gpios: OF device-tree gpio specification. - - label: Descriptive name of the key. - - linux,code: Key / Axis code to emit. - -Optional subnode-properties: - - linux,input-type: Specify event type this button/key generates. - If not specified defaults to <1> == EV_KEY. - - linux,input-value: If linux,input-type is EV_ABS or EV_REL then this - value is sent for events this button generates when pressed. - EV_ABS/EV_REL axis will generate an event with a value of 0 when - all buttons with linux,input-type == type and linux,code == axis - are released. This value is interpreted as a signed 32 bit value, - e.g. to make a button generate a value of -1 use: - linux,input-value = <0xffffffff>; /* -1 */ - - debounce-interval: Debouncing interval time in milliseconds. - If not specified defaults to 5. - - wakeup-source: Boolean, button can wake-up the system. - (Legacy property supported: "gpio-key,wakeup") - -Example nodes: - - gpio_keys_polled { - compatible = "gpio-keys-polled"; - poll-interval = <100>; - autorepeat; - - button21 { - label = "GPIO Key UP"; - linux,code = <103>; - gpios = <&gpio1 0 1>; - }; - ...
Documentation/devicetree/bindings/input/gpio-keys.txt deleted +0 -58
58 lines not on this page · raw message
Documentation/devicetree/bindings/input/gpio-keys.yaml new file +152 -0
152 lines not on this page · raw message
Signature · 1 line
2.20.1