1# Copyright (c) 2018, Linaro Limited
2# SPDX-License-Identifier: Apache-2.0
3
4description: |
5  Zephyr Input GPIO KEYS parent node
6
7  This defines a group of buttons that can generate input events. Each button
8  is defined in a child node of the gpio-keys node and defines a specific key
9  code.
10
11  For example:
12
13  #include <zephyr/dt-bindings/input/input-event-codes.h>
14
15  / {
16         buttons {
17                 compatible = "gpio-keys";
18                 button_0 {
19                         gpios = <&gpio0 13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
20                         zephyr,code = <INPUT_KEY_0>;
21                 };
22         };
23  };
24
25
26compatible: "gpio-keys"
27
28include: base.yaml
29
30properties:
31  debounce-interval-ms:
32    type: int
33    default: 30
34    description: |
35       Debouncing interval time in milliseconds.
36       If not specified defaults to 30.
37
38  polling-mode:
39    type: boolean
40    description: |
41      Do not use interrupts for the key GPIOs, poll the pin periodically at the
42      specified debounce-interval-ms instead.
43
44  no-disconnect:
45    type: boolean
46    description: |
47      Do not try to disconnect the pin on suspend. Can be used if the GPIO
48      controller does not support the GPIO_DISCONNECTED flag.
49
50child-binding:
51  description: GPIO KEYS child node
52  properties:
53    gpios:
54      type: phandle-array
55      required: true
56
57    label:
58      type: string
59      description: Descriptive name of the key
60
61    zephyr,code:
62      type: int
63      description: Key code to emit.
64