sun4i-lradc-keys.txt 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Allwinner sun4i low res adc attached tablet keys
  2. ------------------------------------------------
  3. Required properties:
  4. - compatible: "allwinner,sun4i-a10-lradc-keys"
  5. - reg: mmio address range of the chip
  6. - interrupts: interrupt to which the chip is connected
  7. - vref-supply: powersupply for the lradc reference voltage
  8. Each key is represented as a sub-node of "allwinner,sun4i-a10-lradc-keys":
  9. Required subnode-properties:
  10. - label: Descriptive name of the key.
  11. - linux,code: Keycode to emit.
  12. - channel: Channel this key is attached to, must be 0 or 1.
  13. - voltage: Voltage in µV at lradc input when this key is pressed.
  14. Example:
  15. #include <dt-bindings/input/input.h>
  16. lradc: lradc@01c22800 {
  17. compatible = "allwinner,sun4i-a10-lradc-keys";
  18. reg = <0x01c22800 0x100>;
  19. interrupts = <31>;
  20. vref-supply = <&reg_vcc3v0>;
  21. button@191 {
  22. label = "Volume Up";
  23. linux,code = <KEY_VOLUMEUP>;
  24. channel = <0>;
  25. voltage = <191274>;
  26. };
  27. button@392 {
  28. label = "Volume Down";
  29. linux,code = <KEY_VOLUMEDOWN>;
  30. channel = <0>;
  31. voltage = <392644>;
  32. };
  33. button@601 {
  34. label = "Menu";
  35. linux,code = <KEY_MENU>;
  36. channel = <0>;
  37. voltage = <601151>;
  38. };
  39. button@795 {
  40. label = "Enter";
  41. linux,code = <KEY_ENTER>;
  42. channel = <0>;
  43. voltage = <795090>;
  44. };
  45. button@987 {
  46. label = "Home";
  47. linux,code = <KEY_HOMEPAGE>;
  48. channel = <0>;
  49. voltage = <987387>;
  50. };
  51. };