Path: blob/master/Documentation/devicetree/bindings/input/adi,adp5588.yaml
26308 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/input/adi,adp5588.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Analog Devices ADP5588 Keypad Controller78maintainers:9- Nuno Sá <nuno.sa@analog.com>1011description: |12Analog Devices Mobile I/O Expander and QWERTY Keypad Controller13https://www.analog.com/media/en/technical-documentation/data-sheets/ADP5588.pdf1415allOf:16- $ref: matrix-keymap.yaml#17- $ref: input.yaml#1819properties:20compatible:21enum:22- adi,adp558723- adi,adp55882425reg:26maxItems: 12728vcc-supply:29description: Supply Voltage Input3031reset-gpios:32description:33If specified, it will be asserted during driver probe. As the line is34active low, it should be marked GPIO_ACTIVE_LOW.35maxItems: 13637interrupts:38maxItems: 13940gpio-controller:41description:42This property applies if either keypad,num-rows lower than 8 or43keypad,num-columns lower than 10.4445'#gpio-cells':46const: 24748interrupt-controller:49description:50This property applies if either keypad,num-rows lower than 8 or51keypad,num-columns lower than 10. This property is optional if52keypad,num-rows or keypad,num-columns are not specified as the53device is then configured to be used purely for gpio during which54interrupts may or may not be utilized.5556'#interrupt-cells':57const: 25859adi,unlock-keys:60description:61Specifies a maximum of 2 keys that can be used to unlock the keypad.62If this property is set, the keyboard will be locked and only unlocked63after these keys are pressed. If only one key is set, a double click is64needed to unlock the keypad. The value of this property cannot be bigger65or equal than keypad,num-rows * keypad,num-columns.66$ref: /schemas/types.yaml#/definitions/uint32-array67minItems: 168maxItems: 26970dependencies:71keypad,num-rows:72- linux,keymap73- keypad,num-columns74keypad,num-columns:75- linux,keymap76- keypad,num-rows77linux,keymap:78- keypad,num-rows79- keypad,num-columns80- interrupts81interrupt-controller:82- interrupts8384required:85- compatible86- reg8788unevaluatedProperties: false8990examples:91- |92#include <dt-bindings/interrupt-controller/irq.h>93#include <dt-bindings/input/input.h>94#include <dt-bindings/gpio/gpio.h>95i2c {96#address-cells = <1>;97#size-cells = <0>;9899keys@34 {100compatible = "adi,adp5588";101reg = <0x34>;102103vcc-supply = <&vcc>;104interrupts = <21 IRQ_TYPE_EDGE_FALLING>;105interrupt-parent = <&gpio>;106reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;107108keypad,num-rows = <1>;109keypad,num-columns = <9>;110linux,keymap = <111MATRIX_KEY(0x00, 0x00, KEY_1)112MATRIX_KEY(0x00, 0x01, KEY_2)113MATRIX_KEY(0x00, 0x02, KEY_3)114MATRIX_KEY(0x00, 0x03, KEY_4)115MATRIX_KEY(0x00, 0x04, KEY_5)116MATRIX_KEY(0x00, 0x05, KEY_6)117MATRIX_KEY(0x00, 0x06, KEY_7)118MATRIX_KEY(0x00, 0x07, KEY_8)119MATRIX_KEY(0x00, 0x08, KEY_9)120>;121};122};123124- |125#include <dt-bindings/gpio/gpio.h>126i2c {127#address-cells = <1>;128#size-cells = <0>;129gpio@34 {130compatible = "adi,adp5588";131reg = <0x34>;132133#gpio-cells = <2>;134gpio-controller;135};136};137138...139140141