Skip to content

Commit e51cb50

Browse files
Markus Burridtor
authored andcommitted
dt-bindings: input: matrix_keypad: convert to YAML
Convert the gpio-matrix-keypad bindings from text to DT schema. Signed-off-by: Markus Burri <markus.burri@mt.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Manuel Traut <manuel.traut@mt.com> Link: https://lore.kernel.org/r/20250110054906.354296-4-markus.burri@mt.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 2034fe6 commit e51cb50

File tree

3 files changed

+89
-50
lines changed

3 files changed

+89
-50
lines changed

Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
5+
$id: http://devicetree.org/schemas/input/gpio-matrix-keypad.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: GPIO matrix keypad
9+
10+
maintainers:
11+
- Marek Vasut <marek.vasut@gmail.com>
12+
13+
description:
14+
GPIO driven matrix keypad is used to interface a SoC with a matrix keypad.
15+
The matrix keypad supports multiple row and column lines, a key can be
16+
placed at each intersection of a unique row and a unique column. The matrix
17+
keypad can sense a key-press and key-release by means of GPIO lines and
18+
report the event using GPIO interrupts to the cpu.
19+
20+
allOf:
21+
- $ref: /schemas/input/matrix-keymap.yaml#
22+
23+
properties:
24+
compatible:
25+
const: gpio-matrix-keypad
26+
27+
row-gpios:
28+
description:
29+
List of GPIOs used as row lines. The gpio specifier for this property
30+
depends on the gpio controller to which these row lines are connected.
31+
32+
col-gpios:
33+
description:
34+
List of GPIOs used as column lines. The gpio specifier for this property
35+
depends on the gpio controller to which these column lines are connected.
36+
37+
linux,keymap: true
38+
39+
linux,no-autorepeat:
40+
type: boolean
41+
description: Do not enable autorepeat feature.
42+
43+
44+
debounce-delay-ms:
45+
description: Debounce interval in milliseconds.
46+
default: 0
47+
48+
col-scan-delay-us:
49+
description:
50+
Delay, measured in microseconds, that is needed
51+
before we can scan keypad after activating column gpio.
52+
default: 0
53+
54+
drive-inactive-cols:
55+
type: boolean
56+
description:
57+
Drive inactive columns during scan,
58+
default is to turn inactive columns into inputs.
59+
60+
required:
61+
- compatible
62+
- row-gpios
63+
- col-gpios
64+
- linux,keymap
65+
66+
additionalProperties: false
67+
68+
examples:
69+
- |
70+
matrix-keypad {
71+
compatible = "gpio-matrix-keypad";
72+
debounce-delay-ms = <5>;
73+
col-scan-delay-us = <2>;
74+
75+
row-gpios = <&gpio2 25 0
76+
&gpio2 26 0
77+
&gpio2 27 0>;
78+
79+
col-gpios = <&gpio2 21 0
80+
&gpio2 22 0>;
81+
82+
linux,keymap = <0x0000008B
83+
0x0100009E
84+
0x02000069
85+
0x0001006A
86+
0x0101001C
87+
0x0201006C>;
88+
};

Documentation/devicetree/bindings/power/wakeup-source.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ List of legacy properties and respective binding document
2323

2424
1. "gpio-key,wakeup" Documentation/devicetree/bindings/input/gpio-keys{,-polled}.txt
2525
2. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt
26-
3. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt
26+
3. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml
2727
Documentation/devicetree/bindings/mfd/tc3589x.txt
2828
Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml
2929
4. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8921-keypad.yaml

0 commit comments

Comments
 (0)