Skip to content

Commit 1b7d2e1

Browse files
nxpfranklidtor
authored andcommitted
dt-bindings: input: convert tca8418_keypad.txt to yaml format
Convert tca8418_keypad.txt to yaml format. Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250916171327.3773620-1-Frank.Li@nxp.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 11fafeb commit 1b7d2e1

2 files changed

Lines changed: 61 additions & 10 deletions

File tree

Documentation/devicetree/bindings/input/tca8418_keypad.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/input/ti,tca8418.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: TI TCA8418 I2C/SMBus keypad scanner
8+
9+
maintainers:
10+
- Frank Li <Frank.Li@nxp.com>
11+
12+
properties:
13+
compatible:
14+
enum:
15+
- ti,tca8418
16+
17+
reg:
18+
maxItems: 1
19+
20+
interrupts:
21+
maxItems: 1
22+
23+
required:
24+
- compatible
25+
- reg
26+
- interrupts
27+
28+
allOf:
29+
- $ref: matrix-keymap.yaml#
30+
31+
unevaluatedProperties: false
32+
33+
examples:
34+
- |
35+
#include <dt-bindings/input/input.h>
36+
#include <dt-bindings/interrupt-controller/irq.h>
37+
38+
i2c {
39+
#address-cells = <1>;
40+
#size-cells = <0>;
41+
42+
keypad@34 {
43+
compatible = "ti,tca8418";
44+
reg = <0x34>;
45+
interrupt-parent = <&gpio5>;
46+
interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
47+
keypad,num-rows = <4>;
48+
keypad,num-columns = <4>;
49+
linux,keymap = < MATRIX_KEY(0x00, 0x01, BTN_0)
50+
MATRIX_KEY(0x00, 0x00, BTN_1)
51+
MATRIX_KEY(0x01, 0x01, BTN_2)
52+
MATRIX_KEY(0x01, 0x00, BTN_3)
53+
MATRIX_KEY(0x02, 0x00, BTN_4)
54+
MATRIX_KEY(0x00, 0x03, BTN_5)
55+
MATRIX_KEY(0x00, 0x02, BTN_6)
56+
MATRIX_KEY(0x01, 0x03, BTN_7)
57+
MATRIX_KEY(0x01, 0x02, BTN_8)
58+
MATRIX_KEY(0x02, 0x02, BTN_9)
59+
>;
60+
};
61+
};

0 commit comments

Comments
 (0)