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

dt-bindings: input: ti,nspire-keypad: convert to YAML format

Convert TI-NSPIRE Keypad controller bindings to DT schema.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240612150711.26706-1-afd@ti.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Andrew Davis and committed by
Dmitry Torokhov
3b42b9ad f275b3ae

+74 -60
-60
Documentation/devicetree/bindings/input/ti,nspire-keypad.txt
··· 1 - TI-NSPIRE Keypad 2 - 3 - Required properties: 4 - - compatible: Compatible property value should be "ti,nspire-keypad". 5 - 6 - - reg: Physical base address of the peripheral and length of memory mapped 7 - region. 8 - 9 - - interrupts: The interrupt number for the peripheral. 10 - 11 - - scan-interval: How often to scan in us. Based on a APB speed of 33MHz, the 12 - maximum and minimum delay time is ~2000us and ~500us respectively 13 - 14 - - row-delay: How long to wait before scanning each row. 15 - 16 - - clocks: The clock this peripheral is attached to. 17 - 18 - - linux,keymap: The keymap to use 19 - (see Documentation/devicetree/bindings/input/matrix-keymap.txt) 20 - 21 - Optional properties: 22 - - active-low: Specify that the keypad is active low (i.e. logical low signifies 23 - a key press). 24 - 25 - Example: 26 - 27 - input { 28 - compatible = "ti,nspire-keypad"; 29 - reg = <0x900E0000 0x1000>; 30 - interrupts = <16>; 31 - 32 - scan-interval = <1000>; 33 - row-delay = <200>; 34 - 35 - clocks = <&apb_pclk>; 36 - 37 - linux,keymap = < 38 - 0x0000001c 0x0001001c 0x00040039 39 - 0x0005002c 0x00060015 0x0007000b 40 - 0x0008000f 0x0100002d 0x01010011 41 - 0x0102002f 0x01030004 0x01040016 42 - 0x01050014 0x0106001f 0x01070002 43 - 0x010a006a 0x02000013 0x02010010 44 - 0x02020019 0x02030007 0x02040018 45 - 0x02050031 0x02060032 0x02070005 46 - 0x02080028 0x0209006c 0x03000026 47 - 0x03010025 0x03020024 0x0303000a 48 - 0x03040017 0x03050023 0x03060022 49 - 0x03070008 0x03080035 0x03090069 50 - 0x04000021 0x04010012 0x04020020 51 - 0x0404002e 0x04050030 0x0406001e 52 - 0x0407000d 0x04080037 0x04090067 53 - 0x05010038 0x0502000c 0x0503001b 54 - 0x05040034 0x0505001a 0x05060006 55 - 0x05080027 0x0509000e 0x050a006f 56 - 0x0600002b 0x0602004e 0x06030068 57 - 0x06040003 0x0605006d 0x06060009 58 - 0x06070001 0x0609000f 0x0708002a 59 - 0x0709001d 0x070a0033 >; 60 - };
+74
Documentation/devicetree/bindings/input/ti,nspire-keypad.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/input/ti,nspire-keypad.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: TI-NSPIRE Keypad 8 + 9 + maintainers: 10 + - Andrew Davis <afd@ti.com> 11 + 12 + allOf: 13 + - $ref: input.yaml# 14 + - $ref: matrix-keymap.yaml# 15 + 16 + properties: 17 + compatible: 18 + enum: 19 + - ti,nspire-keypad 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + interrupts: 25 + maxItems: 1 26 + 27 + clocks: 28 + maxItems: 1 29 + 30 + scan-interval: 31 + $ref: /schemas/types.yaml#/definitions/uint32 32 + description: How often to scan in us. Based on a APB speed of 33MHz, the 33 + maximum and minimum delay time is ~2000us and ~500us respectively 34 + 35 + row-delay: 36 + $ref: /schemas/types.yaml#/definitions/uint32 37 + description: How long to wait between scanning each row in us. 38 + 39 + active-low: 40 + description: Specify that the keypad is active low. 41 + 42 + required: 43 + - compatible 44 + - reg 45 + - interrupts 46 + - clocks 47 + - scan-interval 48 + - row-delay 49 + - linux,keymap 50 + 51 + unevaluatedProperties: false 52 + 53 + examples: 54 + - | 55 + #include <dt-bindings/input/input.h> 56 + keypad@900e0000 { 57 + compatible = "ti,nspire-keypad"; 58 + reg = <0x900e0000 0x1000>; 59 + interrupts = <16>; 60 + 61 + clocks = <&apb_pclk>; 62 + 63 + scan-interval = <1000>; 64 + row-delay = <200>; 65 + 66 + linux,keymap = < 67 + MATRIX_KEY(0, 0, KEY_ENTER) 68 + MATRIX_KEY(0, 1, KEY_ENTER) 69 + MATRIX_KEY(0, 4, KEY_SPACE) 70 + MATRIX_KEY(0, 5, KEY_Z) 71 + MATRIX_KEY(0, 6, KEY_Y) 72 + MATRIX_KEY(0, 7, KEY_0) 73 + >; 74 + };