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

dt-bindings: input: convert lpc32xx-key.txt to yaml format

Convert lpc32xx-key.txt to yaml format.

Additional changes:
- set maximum of key-row(column) to 4.
- add ref to matrix-keymap.yaml.

Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250818183814.3603308-1-Frank.Li@nxp.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Frank Li and committed by
Dmitry Torokhov
fb43a9e6 df595059

+61 -34
-34
Documentation/devicetree/bindings/input/lpc32xx-key.txt
··· 1 - NXP LPC32xx Key Scan Interface 2 - 3 - This binding is based on the matrix-keymap binding with the following 4 - changes: 5 - 6 - Required Properties: 7 - - compatible: Should be "nxp,lpc3220-key" 8 - - reg: Physical base address of the controller and length of memory mapped 9 - region. 10 - - interrupts: The interrupt number to the cpu. 11 - - clocks: phandle to clock controller plus clock-specifier pair 12 - - nxp,debounce-delay-ms: Debounce delay in ms 13 - - nxp,scan-delay-ms: Repeated scan period in ms 14 - - linux,keymap: the key-code to be reported when the key is pressed 15 - and released, see also 16 - Documentation/devicetree/bindings/input/matrix-keymap.txt 17 - 18 - Note: keypad,num-rows and keypad,num-columns are required, and must be equal 19 - since LPC32xx only supports square matrices 20 - 21 - Example: 22 - 23 - key@40050000 { 24 - compatible = "nxp,lpc3220-key"; 25 - reg = <0x40050000 0x1000>; 26 - clocks = <&clk LPC32XX_CLK_KEY>; 27 - interrupt-parent = <&sic1>; 28 - interrupts = <22 IRQ_TYPE_LEVEL_HIGH>; 29 - keypad,num-rows = <1>; 30 - keypad,num-columns = <1>; 31 - nxp,debounce-delay-ms = <3>; 32 - nxp,scan-delay-ms = <34>; 33 - linux,keymap = <0x00000002>; 34 - };
+61
Documentation/devicetree/bindings/input/nxp,lpc3220-key.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/nxp,lpc3220-key.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: NXP LPC32xx Key Scan Interface 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + properties: 13 + compatible: 14 + const: nxp,lpc3220-key 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + interrupts: 20 + maxItems: 1 21 + 22 + clocks: 23 + maxItems: 1 24 + 25 + nxp,debounce-delay-ms: 26 + description: Debounce delay in ms 27 + 28 + nxp,scan-delay-ms: 29 + description: Repeated scan period in ms 30 + 31 + required: 32 + - compatible 33 + - reg 34 + - interrupts 35 + - clocks 36 + - nxp,debounce-delay-ms 37 + - nxp,scan-delay-ms 38 + - linux,keymap 39 + 40 + allOf: 41 + - $ref: matrix-keymap.yaml# 42 + 43 + unevaluatedProperties: false 44 + 45 + examples: 46 + - | 47 + #include <dt-bindings/interrupt-controller/irq.h> 48 + #include <dt-bindings/clock/lpc32xx-clock.h> 49 + 50 + key@40050000 { 51 + compatible = "nxp,lpc3220-key"; 52 + reg = <0x40050000 0x1000>; 53 + clocks = <&clk LPC32XX_CLK_KEY>; 54 + interrupt-parent = <&sic1>; 55 + interrupts = <22 IRQ_TYPE_LEVEL_HIGH>; 56 + keypad,num-rows = <1>; 57 + keypad,num-columns = <1>; 58 + nxp,debounce-delay-ms = <3>; 59 + nxp,scan-delay-ms = <34>; 60 + linux,keymap = <0x00000002>; 61 + };