qpnp-keypad.txt 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. Qualcomm QPNP keypad controller
  2. The qpnp-keypad driver supports the PMIC keypad controller module
  3. in the Qualcomm PMICs. This controller supports 10 x 8 (row x col)
  4. configuration and is connected to the host processor on the
  5. SPMI interface.
  6. Required properties:
  7. - compatible: Must be "qcom,qpnp-keypad"
  8. - reg: Specifies the SPMI address and size for the keypad controller
  9. - interrupts: Specifies the interrupt associated with keypad controller
  10. - interrupt-names: The names of the 2 interrupts assocaited with the keypad
  11. controller. They are - "kp-sense" and "kp-stuck".
  12. - keypad,num-rows: Number of rows used in the keypad configuration. These
  13. rows are the number of PMIC gpios configured as drive
  14. lines. Possible values: Max = 10, Min = 2.
  15. - keypad,num-columns: Number of columns used in the keypad configuration. These
  16. cols are number of PMIC gpios configured as sense lines.
  17. Possible values: Max = 8, Min = 1.
  18. - linux,keymap: Row-column-keycode mapping. It is an array of packed
  19. entries containing the equivalent of row, column and
  20. linux key-code. Each value represented as
  21. (row << 24 | column << 16 | key-code)
  22. Optional Properties:
  23. - qcom,scan-delay-ms: Wait time in milliseconds before each keypad scan.
  24. This is used to determine if the key has been stuck.
  25. Possible values: 1, 2, 4, 8, 16, 32, 64, 128ms.
  26. - qcom,row-hold-ns: Wait time in nanoseconds between each row assertion.
  27. Configured based on last-row scan delay.
  28. Possible values: 31250, 62500, 125000, 250000ns.
  29. - qcom,debounce-ms: Wait time in milliseconds before the column data is
  30. sampled for key press detection.
  31. Possible values: 5, 10, 15, 20ms.
  32. - qcom,wakeup: Configure the keypad as a wakeup source. This is a
  33. boolean property.
  34. - linux,keypad-no-autorepeat:
  35. Disables the auto-repeat feature for the keys. This
  36. is a boolean property.
  37. Example:
  38. qcom,keypad@a800 {
  39. compatible = "qcom,qpnp-keypad";
  40. reg = <0xA800 0x100>;
  41. interrupts = <0x1 0xA8 0x0>,
  42. <0x1 0xA8 0x1>;
  43. interrupt-names = "kp-sense", "kp-stuck";
  44. keypad,num-rows = <2>;
  45. keypad,num-cols = <2>;
  46. qcom,scan-delay-ms = <128>;
  47. qcom,row-hold-ns = <31250>;
  48. qcom,debounce-ms = <20>;
  49. qcom,wakeup;
  50. linux,keymap = <0x00000001 0x00010002
  51. 0x01000003 0x01010004>;
  52. }