Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Frank Li and committed by
Dmitry Torokhov
1b7d2e17 11fafeb2

+61 -10
-10
Documentation/devicetree/bindings/input/tca8418_keypad.txt
··· 1 - This binding is based on the matrix-keymap binding with the following 2 - changes: 3 - 4 - keypad,num-rows and keypad,num-columns are required. 5 - 6 - Required properties: 7 - - compatible: "ti,tca8418" 8 - - reg: the I2C address 9 - - interrupts: IRQ line number, should trigger on falling edge 10 - - linux,keymap: Keys definitions, see keypad-matrix.
+61
Documentation/devicetree/bindings/input/ti,tca8418.yaml
··· 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 + };