samsung,s3c6410-keypad.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/input/samsung,s3c6410-keypad.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Samsung SoC series Keypad Controller
  7. description:
  8. Samsung SoC Keypad controller is used to interface a SoC with a matrix-type
  9. keypad device. The keypad controller supports multiple row and column lines.
  10. A key can be placed at each intersection of a unique row and a unique column.
  11. The keypad controller can sense a key-press and key-release and report the
  12. event using a interrupt to the cpu.
  13. maintainers:
  14. - Krzysztof Kozlowski <krzk@kernel.org>
  15. properties:
  16. compatible:
  17. enum:
  18. - samsung,s3c6410-keypad
  19. - samsung,s5pv210-keypad
  20. reg:
  21. maxItems: 1
  22. clocks:
  23. maxItems: 1
  24. clock-names:
  25. items:
  26. - const: keypad
  27. interrupts:
  28. maxItems: 1
  29. wakeup-source: true
  30. linux,input-no-autorepeat:
  31. type: boolean
  32. description:
  33. Do no enable autorepeat feature.
  34. linux,input-wakeup:
  35. type: boolean
  36. deprecated: true
  37. samsung,keypad-num-columns:
  38. $ref: /schemas/types.yaml#/definitions/uint32
  39. description:
  40. Number of column lines connected to the keypad controller.
  41. samsung,keypad-num-rows:
  42. $ref: /schemas/types.yaml#/definitions/uint32
  43. description:
  44. Number of row lines connected to the keypad controller.
  45. patternProperties:
  46. '^key-[0-9a-z]+$':
  47. type: object
  48. $ref: input.yaml#
  49. additionalProperties: false
  50. description:
  51. Each key connected to the keypad controller is represented as a child
  52. node to the keypad controller device node.
  53. properties:
  54. keypad,column:
  55. $ref: /schemas/types.yaml#/definitions/uint32
  56. description: The column number to which the key is connected.
  57. keypad,row:
  58. $ref: /schemas/types.yaml#/definitions/uint32
  59. description: The row number to which the key is connected.
  60. linux,code: true
  61. required:
  62. - keypad,column
  63. - keypad,row
  64. - linux,code
  65. required:
  66. - compatible
  67. - reg
  68. - interrupts
  69. - samsung,keypad-num-columns
  70. - samsung,keypad-num-rows
  71. additionalProperties: false
  72. examples:
  73. - |
  74. #include <dt-bindings/clock/exynos4.h>
  75. #include <dt-bindings/interrupt-controller/arm-gic.h>
  76. keypad@100a0000 {
  77. compatible = "samsung,s5pv210-keypad";
  78. reg = <0x100a0000 0x100>;
  79. interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
  80. clocks = <&clock CLK_KEYIF>;
  81. clock-names = "keypad";
  82. samsung,keypad-num-rows = <2>;
  83. samsung,keypad-num-columns = <8>;
  84. linux,input-no-autorepeat;
  85. wakeup-source;
  86. key-1 {
  87. keypad,row = <0>;
  88. keypad,column = <3>;
  89. linux,code = <2>;
  90. };
  91. key-2 {
  92. keypad,row = <0>;
  93. keypad,column = <4>;
  94. linux,code = <3>;
  95. };
  96. };