brintos

brintos / linux-shallow public Read only

0
0
Text · 3.5 KiB · 336bc35 Raw
140 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/input/adi,adp5588.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Analog Devices ADP5588 Keypad Controller8 9maintainers:10  - Nuno Sá <nuno.sa@analog.com>11 12description: |13  Analog Devices Mobile I/O Expander and QWERTY Keypad Controller14  https://www.analog.com/media/en/technical-documentation/data-sheets/ADP5588.pdf15 16allOf:17  - $ref: matrix-keymap.yaml#18  - $ref: input.yaml#19 20properties:21  compatible:22    enum:23      - adi,adp558724      - adi,adp558825 26  reg:27    maxItems: 128 29  vcc-supply:30    description: Supply Voltage Input31 32  reset-gpios:33    description:34      If specified, it will be asserted during driver probe. As the line is35      active low, it should be marked GPIO_ACTIVE_LOW.36    maxItems: 137 38  interrupts:39    maxItems: 140 41  gpio-controller:42    description:43      This property applies if either keypad,num-rows lower than 8 or44      keypad,num-columns lower than 10.45 46  '#gpio-cells':47    const: 248 49  interrupt-controller:50    description:51      This property applies if either keypad,num-rows lower than 8 or52      keypad,num-columns lower than 10. This property is optional if53      keypad,num-rows or keypad,num-columns are not specified as the54      device is then configured to be used purely for gpio during which55      interrupts may or may not be utilized.56 57  '#interrupt-cells':58    const: 259 60  adi,unlock-keys:61    description:62      Specifies a maximum of 2 keys that can be used to unlock the keypad.63      If this property is set, the keyboard will be locked and only unlocked64      after these keys are pressed. If only one key is set, a double click is65      needed to unlock the keypad. The value of this property cannot be bigger66      or equal than keypad,num-rows * keypad,num-columns.67    $ref: /schemas/types.yaml#/definitions/uint32-array68    minItems: 169    maxItems: 270 71dependencies:72  keypad,num-rows:73    - linux,keymap74    - keypad,num-columns75  keypad,num-columns:76    - linux,keymap77    - keypad,num-rows78  linux,keymap:79    - keypad,num-rows80    - keypad,num-columns81    - interrupts82  interrupt-controller:83    - interrupts84 85required:86  - compatible87  - reg88 89unevaluatedProperties: false90 91examples:92  - |93    #include <dt-bindings/interrupt-controller/irq.h>94    #include <dt-bindings/input/input.h>95    #include <dt-bindings/gpio/gpio.h>96    i2c {97        #address-cells = <1>;98        #size-cells = <0>;99 100        keys@34 {101            compatible = "adi,adp5588";102            reg = <0x34>;103 104            vcc-supply = <&vcc>;105            interrupts = <21 IRQ_TYPE_EDGE_FALLING>;106            interrupt-parent = <&gpio>;107            reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;108 109            keypad,num-rows = <1>;110            keypad,num-columns = <9>;111            linux,keymap = <112                MATRIX_KEY(0x00, 0x00, KEY_1)113                MATRIX_KEY(0x00, 0x01, KEY_2)114                MATRIX_KEY(0x00, 0x02, KEY_3)115                MATRIX_KEY(0x00, 0x03, KEY_4)116                MATRIX_KEY(0x00, 0x04, KEY_5)117                MATRIX_KEY(0x00, 0x05, KEY_6)118                MATRIX_KEY(0x00, 0x06, KEY_7)119                MATRIX_KEY(0x00, 0x07, KEY_8)120                MATRIX_KEY(0x00, 0x08, KEY_9)121            >;122        };123    };124 125  - |126    #include <dt-bindings/gpio/gpio.h>127    i2c {128        #address-cells = <1>;129        #size-cells = <0>;130        gpio@34 {131            compatible = "adi,adp5588";132            reg = <0x34>;133 134            #gpio-cells = <2>;135            gpio-controller;136        };137    };138 139...140