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