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

dt-bindings: input: adp5588: add bindings

Add device tree bindings for the adp5588-keys driver.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220829131553.690063-6-nuno.sa@analog.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Nuno Sá and committed by
Dmitry Torokhov
81ce5b77 6704a862

+112
+111
Documentation/devicetree/bindings/input/adi,adp5588.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/adi,adp5588.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Analog Devices ADP5588 Keypad Controller 8 + 9 + maintainers: 10 + - Nuno Sá <nuno.sa@analog.com> 11 + 12 + description: | 13 + Analog Devices Mobile I/O Expander and QWERTY Keypad Controller 14 + https://www.analog.com/media/en/technical-documentation/data-sheets/ADP5588.pdf 15 + 16 + allOf: 17 + - $ref: matrix-keymap.yaml# 18 + - $ref: input.yaml# 19 + 20 + properties: 21 + compatible: 22 + enum: 23 + - adi,adp5587 24 + - adi,adp5588 25 + 26 + reg: 27 + maxItems: 1 28 + 29 + vcc-supply: 30 + description: Supply Voltage Input 31 + 32 + reset-gpios: 33 + description: 34 + If specified, it will be asserted during driver probe. As the line is 35 + active low, it should be marked GPIO_ACTIVE_LOW. 36 + maxItems: 1 37 + 38 + interrupts: 39 + maxItems: 1 40 + 41 + gpio-controller: 42 + description: 43 + This property applies if either keypad,num-rows lower than 8 or 44 + keypad,num-columns lower than 10. 45 + 46 + '#gpio-cells': 47 + const: 2 48 + 49 + interrupt-controller: 50 + description: 51 + This property applies if either keypad,num-rows lower than 8 or 52 + keypad,num-columns lower than 10. 53 + 54 + '#interrupt-cells': 55 + const: 2 56 + 57 + adi,unlock-keys: 58 + description: 59 + Specifies a maximum of 2 keys that can be used to unlock the keypad. 60 + If this property is set, the keyboard will be locked and only unlocked 61 + after these keys are pressed. If only one key is set, a double click is 62 + needed to unlock the keypad. The value of this property cannot be bigger 63 + or equal than keypad,num-rows * keypad,num-columns. 64 + $ref: /schemas/types.yaml#/definitions/uint32-array 65 + minItems: 1 66 + maxItems: 2 67 + 68 + required: 69 + - compatible 70 + - reg 71 + - interrupts 72 + - keypad,num-rows 73 + - keypad,num-columns 74 + - linux,keymap 75 + 76 + unevaluatedProperties: false 77 + 78 + examples: 79 + - | 80 + #include <dt-bindings/interrupt-controller/irq.h> 81 + #include <dt-bindings/input/input.h> 82 + #include <dt-bindings/gpio/gpio.h> 83 + i2c { 84 + #address-cells = <1>; 85 + #size-cells = <0>; 86 + 87 + keys@34 { 88 + compatible = "adi,adp5588"; 89 + reg = <0x34>; 90 + 91 + vcc-supply = <&vcc>; 92 + interrupts = <21 IRQ_TYPE_EDGE_FALLING>; 93 + interrupt-parent = <&gpio>; 94 + reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>; 95 + 96 + keypad,num-rows = <1>; 97 + keypad,num-columns = <9>; 98 + linux,keymap = < 99 + MATRIX_KEY(0x00, 0x00, KEY_1) 100 + MATRIX_KEY(0x00, 0x01, KEY_2) 101 + MATRIX_KEY(0x00, 0x02, KEY_3) 102 + MATRIX_KEY(0x00, 0x03, KEY_4) 103 + MATRIX_KEY(0x00, 0x04, KEY_5) 104 + MATRIX_KEY(0x00, 0x05, KEY_6) 105 + MATRIX_KEY(0x00, 0x06, KEY_7) 106 + MATRIX_KEY(0x00, 0x07, KEY_8) 107 + MATRIX_KEY(0x00, 0x08, KEY_9) 108 + >; 109 + }; 110 + }; 111 + ...
+1
MAINTAINERS
··· 556 556 S: Supported 557 557 W: http://wiki.analog.com/ADP5588 558 558 W: https://ez.analog.com/linux-software-drivers 559 + F: Documentation/devicetree/bindings/input/adi,adp5588.yaml 559 560 F: drivers/input/keyboard/adp5588-keys.c 560 561 561 562 ADP8860 BACKLIGHT DRIVER (ADP8860/ADP8861/ADP8863)