50 lines · plain
1* GPIO driven matrix keypad device tree bindings2 3GPIO driven matrix keypad is used to interface a SoC with a matrix keypad.4The matrix keypad supports multiple row and column lines, a key can be5placed at each intersection of a unique row and a unique column. The matrix6keypad can sense a key-press and key-release by means of GPIO lines and7report the event using GPIO interrupts to the cpu.8 9Required Properties:10- compatible: Should be "gpio-matrix-keypad"11- row-gpios: List of gpios used as row lines. The gpio specifier12 for this property depends on the gpio controller to13 which these row lines are connected.14- col-gpios: List of gpios used as column lines. The gpio specifier15 for this property depends on the gpio controller to16 which these column lines are connected.17- linux,keymap: The definition can be found at18 bindings/input/matrix-keymap.txt19 20Optional Properties:21- linux,no-autorepeat: do no enable autorepeat feature.22- wakeup-source: use any event on keypad as wakeup event.23 (Legacy property supported: "linux,wakeup")24- debounce-delay-ms: debounce interval in milliseconds25- col-scan-delay-us: delay, measured in microseconds, that is needed26 before we can scan keypad after activating column gpio27- drive-inactive-cols: drive inactive columns during scan,28 default is to turn inactive columns into inputs.29 30Example:31 matrix-keypad {32 compatible = "gpio-matrix-keypad";33 debounce-delay-ms = <5>;34 col-scan-delay-us = <2>;35 36 row-gpios = <&gpio2 25 037 &gpio2 26 038 &gpio2 27 0>;39 40 col-gpios = <&gpio2 21 041 &gpio2 22 0>;42 43 linux,keymap = <0x0000008B44 0x0100009E45 0x0200006946 0x0001006A47 0x0101001C48 0x0201006C>;49 };50