Path: blob/master/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml
26308 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1%YAML 1.22---34$id: http://devicetree.org/schemas/input/gpio-matrix-keypad.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#67title: GPIO matrix keypad89maintainers:10- Marek Vasut <marek.vasut@gmail.com>1112description:13GPIO driven matrix keypad is used to interface a SoC with a matrix keypad.14The matrix keypad supports multiple row and column lines, a key can be15placed at each intersection of a unique row and a unique column. The matrix16keypad can sense a key-press and key-release by means of GPIO lines and17report the event using GPIO interrupts to the cpu.1819allOf:20- $ref: /schemas/input/matrix-keymap.yaml#2122properties:23compatible:24const: gpio-matrix-keypad2526row-gpios:27description:28List of GPIOs used as row lines. The gpio specifier for this property29depends on the gpio controller to which these row lines are connected.3031col-gpios:32description:33List of GPIOs used as column lines. The gpio specifier for this property34depends on the gpio controller to which these column lines are connected.3536linux,keymap: true3738linux,no-autorepeat:39type: boolean40description: Do not enable autorepeat feature.4142gpio-activelow:43type: boolean44description:45Force GPIO polarity to active low.46In the absence of this property GPIOs are treated as active high.4748debounce-delay-ms:49description: Debounce interval in milliseconds.50default: 05152col-scan-delay-us:53description:54Delay, measured in microseconds, that is needed55before we can scan keypad after activating column gpio.56default: 05758all-cols-on-delay-us:59description:60Delay, measured in microseconds, that is needed61after activating all column gpios.62default: 06364drive-inactive-cols:65type: boolean66description:67Drive inactive columns during scan,68default is to turn inactive columns into inputs.6970wakeup-source: true7172required:73- compatible74- row-gpios75- col-gpios76- linux,keymap7778additionalProperties: false7980examples:81- |82matrix-keypad {83compatible = "gpio-matrix-keypad";84debounce-delay-ms = <5>;85col-scan-delay-us = <2>;8687row-gpios = <&gpio2 25 088&gpio2 26 089&gpio2 27 0>;9091col-gpios = <&gpio2 21 092&gpio2 22 0>;9394linux,keymap = <0x0000008B950x0100009E960x02000069970x0001006A980x0101001C990x0201006C>;100101wakeup-source;102};103104105