gpio-matrix-keypad.txt 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. * GPIO driven matrix keypad device tree bindings
  2. GPIO driven matrix keypad is used to interface a SoC with a matrix keypad.
  3. The matrix keypad supports multiple row and column lines, a key can be
  4. placed at each intersection of a unique row and a unique column. The matrix
  5. keypad can sense a key-press and key-release by means of GPIO lines and
  6. report the event using GPIO interrupts to the cpu.
  7. Required Properties:
  8. - compatible: Should be "gpio-matrix-keypad"
  9. - row-gpios: List of gpios used as row lines. The gpio specifier
  10. for this property depends on the gpio controller to
  11. which these row lines are connected.
  12. - col-gpios: List of gpios used as column lines. The gpio specifier
  13. for this property depends on the gpio controller to
  14. which these column lines are connected.
  15. - linux,keymap: The definition can be found at
  16. bindings/input/matrix-keymap.txt
  17. Optional Properties:
  18. - linux,no-autorepeat: do no enable autorepeat feature.
  19. - wakeup-source: use any event on keypad as wakeup event.
  20. (Legacy property supported: "linux,wakeup")
  21. - debounce-delay-ms: debounce interval in milliseconds
  22. - col-scan-delay-us: delay, measured in microseconds, that is needed
  23. before we can scan keypad after activating column gpio
  24. Example:
  25. matrix-keypad {
  26. compatible = "gpio-matrix-keypad";
  27. debounce-delay-ms = <5>;
  28. col-scan-delay-us = <2>;
  29. row-gpios = <&gpio2 25 0
  30. &gpio2 26 0
  31. &gpio2 27 0>;
  32. col-gpios = <&gpio2 21 0
  33. &gpio2 22 0>;
  34. linux,keymap = <0x0000008B
  35. 0x0100009E
  36. 0x02000069
  37. 0x0001006A
  38. 0x0101001C
  39. 0x0201006C>;
  40. };