0001 * GPIO driven matrix keypad device tree bindings
0002
0003 GPIO driven matrix keypad is used to interface a SoC with a matrix keypad.
0004 The matrix keypad supports multiple row and column lines, a key can be
0005 placed at each intersection of a unique row and a unique column. The matrix
0006 keypad can sense a key-press and key-release by means of GPIO lines and
0007 report the event using GPIO interrupts to the cpu.
0008
0009 Required Properties:
0010 - compatible: Should be "gpio-matrix-keypad"
0011 - row-gpios: List of gpios used as row lines. The gpio specifier
0012 for this property depends on the gpio controller to
0013 which these row lines are connected.
0014 - col-gpios: List of gpios used as column lines. The gpio specifier
0015 for this property depends on the gpio controller to
0016 which these column lines are connected.
0017 - linux,keymap: The definition can be found at
0018 bindings/input/matrix-keymap.txt
0019
0020 Optional Properties:
0021 - linux,no-autorepeat: do no enable autorepeat feature.
0022 - wakeup-source: use any event on keypad as wakeup event.
0023 (Legacy property supported: "linux,wakeup")
0024 - debounce-delay-ms: debounce interval in milliseconds
0025 - col-scan-delay-us: delay, measured in microseconds, that is needed
0026 before we can scan keypad after activating column gpio
0027 - drive-inactive-cols: drive inactive columns during scan,
0028 default is to turn inactive columns into inputs.
0029
0030 Example:
0031 matrix-keypad {
0032 compatible = "gpio-matrix-keypad";
0033 debounce-delay-ms = <5>;
0034 col-scan-delay-us = <2>;
0035
0036 row-gpios = <&gpio2 25 0
0037 &gpio2 26 0
0038 &gpio2 27 0>;
0039
0040 col-gpios = <&gpio2 21 0
0041 &gpio2 22 0>;
0042
0043 linux,keymap = <0x0000008B
0044 0x0100009E
0045 0x02000069
0046 0x0001006A
0047 0x0101001C
0048 0x0201006C>;
0049 };