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>
33 description: Descriptive name of the key.
36 description: Key / Axis code to emit.
37 $ref: /schemas/types.yaml#/definitions/uint32
41 Specify event type this button/key generates. If not specified defaults to
43 $ref: /schemas/types.yaml#/definitions/uint32
49 If linux,input-type is EV_ABS or EV_REL then this
50 value is sent for events this button generates when pressed.
51 EV_ABS/EV_REL axis will generate an event with a value of 0
52 when all buttons with linux,input-type == type and
53 linux,code == axis are released. This value is interpreted
54 as a signed 32 bit value, e.g. to make a button generate a
57 linux,input-value = <0xffffffff>; /* -1 */
59 $ref: /schemas/types.yaml#/definitions/uint32
63 Debouncing interval time in milliseconds. If not specified defaults to 5.
64 $ref: /schemas/types.yaml#/definitions/uint32
69 description: Button can wake-up the system.
73 Specifies whether the key should wake the system when asserted, when
74 deasserted, or both. This property is only valid for keys that wake up the
75 system (e.g., when the "wakeup-source" property is also provided).
77 Supported values are defined in linux-event-codes.h:
79 EV_ACT_ANY - both asserted and deasserted
80 EV_ACT_ASSERTED - asserted
81 EV_ACT_DEASSERTED - deasserted
82 $ref: /schemas/types.yaml#/definitions/uint32
87 Indicates that button is connected to dedicated (not shared) interrupt
88 which can be disabled to suppress events from the button.
107 wakeup-event-action: [ wakeup-source ]
108 linux,input-value: [ gpios ]
110 unevaluatedProperties: false
115 const: gpio-keys-polled
120 Poll interval time in milliseconds
121 $ref: /schemas/types.yaml#/definitions/uint32
126 additionalProperties: false
130 #include <dt-bindings/interrupt-controller/irq.h>
133 compatible = "gpio-keys";
137 label = "GPIO Key UP";
139 gpios = <&gpio1 0 1>;
143 label = "GPIO Key DOWN";
145 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;