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: 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))$":
36 - description: Optional key interrupt or wakeup interrupt
38 - description: Key interrupt
39 - description: Wakeup interrupt
43 Optional interrupt names, can be used to specify a separate dedicated
44 wake-up interrupt in addition to the gpio irq
47 - enum: [ irq, wakeup ]
53 description: Descriptive name of the key.
56 description: Key / Axis code to emit.
63 If linux,input-type is EV_ABS or EV_REL then this
64 value is sent for events this button generates when pressed.
65 EV_ABS/EV_REL axis will generate an event with a value of 0
66 when all buttons with linux,input-type == type and
67 linux,code == axis are released. This value is interpreted
68 as a signed 32 bit value, e.g. to make a button generate a
71 linux,input-value = <0xffffffff>; /* -1 */
73 $ref: /schemas/types.yaml#/definitions/uint32
77 Debouncing interval time in milliseconds. If not specified defaults to 5.
78 $ref: /schemas/types.yaml#/definitions/uint32
83 description: Button can wake-up the system.
87 Specifies whether the key should wake the system when asserted, when
88 deasserted, or both. This property is only valid for keys that wake up the
89 system (e.g., when the "wakeup-source" property is also provided).
91 Supported values are defined in linux-event-codes.h:
93 EV_ACT_ANY - both asserted and deasserted
94 EV_ACT_ASSERTED - asserted
95 EV_ACT_DEASSERTED - deasserted
96 $ref: /schemas/types.yaml#/definitions/uint32
101 Indicates that button is connected to dedicated (not shared) interrupt
102 which can be disabled to suppress events from the button.
112 - interrupts-extended
131 wakeup-event-action: [ wakeup-source ]
132 linux,input-value: [ gpios ]
134 unevaluatedProperties: false
141 const: gpio-keys-polled
149 additionalProperties: false
153 #include <dt-bindings/interrupt-controller/irq.h>
156 compatible = "gpio-keys";
160 label = "GPIO Key UP";
162 gpios = <&gpio1 0 1>;
166 label = "GPIO Key DOWN";
168 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
172 label = "GPIO Key WAKEUP";
174 interrupts-extended = <&intc 2 IRQ_TYPE_EDGE_FALLING>,
175 <&intc_wakeup 0 IRQ_TYPE_LEVEL_HIGH>;
176 interrupt-names = "irq", "wakeup";