1 # SPDX-License-Identifier: GPL-2.0-only
4 $id: http://devicetree.org/schemas/input/gpio-keys.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Device-Tree bindings for GPIO attached keys
10 - Rob Herring <robh@kernel.org>
21 description: Name of entire device
26 "^(button|event|key|switch|(button|event|key|switch)-[a-z0-9-]+|[a-z0-9-]+-(button|event|key|switch))$":
37 description: Descriptive name of the key.
40 description: Key / Axis code to emit.
47 If linux,input-type is EV_ABS or EV_REL then this
48 value is sent for events this button generates when pressed.
49 EV_ABS/EV_REL axis will generate an event with a value of 0
50 when all buttons with linux,input-type == type and
51 linux,code == axis are released. This value is interpreted
52 as a signed 32 bit value, e.g. to make a button generate a
55 linux,input-value = <0xffffffff>; /* -1 */
57 $ref: /schemas/types.yaml#/definitions/uint32
61 Debouncing interval time in milliseconds. If not specified defaults to 5.
62 $ref: /schemas/types.yaml#/definitions/uint32
67 description: Button can wake-up the system.
71 Specifies whether the key should wake the system when asserted, when
72 deasserted, or both. This property is only valid for keys that wake up the
73 system (e.g., when the "wakeup-source" property is also provided).
75 Supported values are defined in linux-event-codes.h:
77 EV_ACT_ANY - both asserted and deasserted
78 EV_ACT_ASSERTED - asserted
79 EV_ACT_DEASSERTED - deasserted
80 $ref: /schemas/types.yaml#/definitions/uint32
85 Indicates that button is connected to dedicated (not shared) interrupt
86 which can be disabled to suppress events from the button.
101 wakeup-event-action: [ wakeup-source ]
102 linux,input-value: [ gpios ]
104 unevaluatedProperties: false
111 const: gpio-keys-polled
119 additionalProperties: false
123 #include <dt-bindings/interrupt-controller/irq.h>
126 compatible = "gpio-keys";
130 label = "GPIO Key UP";
132 gpios = <&gpio1 0 1>;
136 label = "GPIO Key DOWN";
138 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;