qcom,pm8921-keypad.yaml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/input/qcom,pm8921-keypad.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Qualcomm PM8921 PMIC KeyPad
  7. maintainers:
  8. - Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
  9. allOf:
  10. - $ref: input.yaml#
  11. - $ref: matrix-keymap.yaml#
  12. properties:
  13. compatible:
  14. enum:
  15. - qcom,pm8058-keypad
  16. - qcom,pm8921-keypad
  17. reg:
  18. maxItems: 1
  19. interrupts:
  20. items:
  21. - description: key sense
  22. - description: key stuck
  23. wakeup-source:
  24. type: boolean
  25. description: use any event on keypad as wakeup event
  26. linux,keypad-wakeup:
  27. type: boolean
  28. deprecated: true
  29. description: legacy version of the wakeup-source property
  30. debounce:
  31. description:
  32. Time in microseconds that key must be pressed or
  33. released for state change interrupt to trigger.
  34. $ref: /schemas/types.yaml#/definitions/uint32
  35. scan-delay:
  36. $ref: /schemas/types.yaml#/definitions/uint32
  37. description: time in microseconds to pause between successive scans of the
  38. matrix array
  39. row-hold:
  40. $ref: /schemas/types.yaml#/definitions/uint32
  41. description: time in nanoseconds to pause between scans of each row in the
  42. matrix array.
  43. required:
  44. - compatible
  45. - reg
  46. - interrupts
  47. - linux,keymap
  48. unevaluatedProperties: false
  49. examples:
  50. - |
  51. #include <dt-bindings/input/input.h>
  52. #include <dt-bindings/interrupt-controller/irq.h>
  53. pmic {
  54. #address-cells = <1>;
  55. #size-cells = <0>;
  56. keypad@148 {
  57. compatible = "qcom,pm8921-keypad";
  58. reg = <0x148>;
  59. interrupt-parent = <&pmicintc>;
  60. interrupts = <74 IRQ_TYPE_EDGE_RISING>, <75 IRQ_TYPE_EDGE_RISING>;
  61. linux,keymap = <
  62. MATRIX_KEY(0, 0, KEY_VOLUMEUP)
  63. MATRIX_KEY(0, 1, KEY_VOLUMEDOWN)
  64. MATRIX_KEY(0, 2, KEY_CAMERA_FOCUS)
  65. MATRIX_KEY(0, 3, KEY_CAMERA)
  66. >;
  67. keypad,num-rows = <1>;
  68. keypad,num-columns = <5>;
  69. debounce = <15>;
  70. scan-delay = <32>;
  71. row-hold = <91500>;
  72. };
  73. };
  74. ...