samsung-keypad.txt 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. * Samsung's Keypad Controller device tree bindings
  2. Samsung's Keypad controller is used to interface a SoC with a matrix-type
  3. keypad device. The keypad controller supports multiple row and column lines.
  4. A key can be placed at each intersection of a unique row and a unique column.
  5. The keypad controller can sense a key-press and key-release and report the
  6. event using a interrupt to the cpu.
  7. Required SoC Specific Properties:
  8. - compatible: should be one of the following
  9. - "samsung,s3c6410-keypad": For controllers compatible with s3c6410 keypad
  10. controller.
  11. - "samsung,s5pv210-keypad": For controllers compatible with s5pv210 keypad
  12. controller.
  13. - reg: physical base address of the controller and length of memory mapped
  14. region.
  15. - interrupts: The interrupt number to the cpu.
  16. Required Board Specific Properties:
  17. - samsung,keypad-num-rows: Number of row lines connected to the keypad
  18. controller.
  19. - samsung,keypad-num-columns: Number of column lines connected to the
  20. keypad controller.
  21. - row-gpios: List of gpios used as row lines. The gpio specifier for
  22. this property depends on the gpio controller to which these row lines
  23. are connected.
  24. - col-gpios: List of gpios used as column lines. The gpio specifier for
  25. this property depends on the gpio controller to which these column
  26. lines are connected.
  27. - Keys represented as child nodes: Each key connected to the keypad
  28. controller is represented as a child node to the keypad controller
  29. device node and should include the following properties.
  30. - keypad,row: the row number to which the key is connected.
  31. - keypad,column: the column number to which the key is connected.
  32. - linux,code: the key-code to be reported when the key is pressed
  33. and released.
  34. Optional Properties specific to linux:
  35. - linux,keypad-no-autorepeat: do no enable autorepeat feature.
  36. - linux,keypad-wakeup: use any event on keypad as wakeup event.
  37. Example:
  38. keypad@100A0000 {
  39. compatible = "samsung,s5pv210-keypad";
  40. reg = <0x100A0000 0x100>;
  41. interrupts = <173>;
  42. samsung,keypad-num-rows = <2>;
  43. samsung,keypad-num-columns = <8>;
  44. linux,input-no-autorepeat;
  45. linux,input-wakeup;
  46. row-gpios = <&gpx2 0 3 3 0
  47. &gpx2 1 3 3 0>;
  48. col-gpios = <&gpx1 0 3 0 0
  49. &gpx1 1 3 0 0
  50. &gpx1 2 3 0 0
  51. &gpx1 3 3 0 0
  52. &gpx1 4 3 0 0
  53. &gpx1 5 3 0 0
  54. &gpx1 6 3 0 0
  55. &gpx1 7 3 0 0>;
  56. key_1 {
  57. keypad,row = <0>;
  58. keypad,column = <3>;
  59. linux,code = <2>;
  60. };
  61. key_2 {
  62. keypad,row = <0>;
  63. keypad,column = <4>;
  64. linux,code = <3>;
  65. };
  66. key_3 {
  67. keypad,row = <0>;
  68. keypad,column = <5>;
  69. linux,code = <4>;
  70. };
  71. };