gpio-keys-polled.txt 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Device-Tree bindings for input/gpio_keys_polled.c keyboard driver
  2. Required properties:
  3. - compatible = "gpio-keys-polled";
  4. - poll-interval: Poll interval time in milliseconds
  5. Optional properties:
  6. - autorepeat: Boolean, Enable auto repeat feature of Linux input
  7. subsystem.
  8. Each button (key) is represented as a sub-node of "gpio-keys-polled":
  9. Subnode properties:
  10. - gpios: OF device-tree gpio specification.
  11. - label: Descriptive name of the key.
  12. - linux,code: Key / Axis code to emit.
  13. Optional subnode-properties:
  14. - linux,input-type: Specify event type this button/key generates.
  15. If not specified defaults to <1> == EV_KEY.
  16. - linux,input-value: If linux,input-type is EV_ABS or EV_REL then this
  17. value is sent for events this button generates when pressed.
  18. EV_ABS/EV_REL axis will generate an event with a value of 0 when
  19. all buttons with linux,input-type == type and linux,code == axis
  20. are released. This value is interpreted as a signed 32 bit value,
  21. e.g. to make a button generate a value of -1 use:
  22. linux,input-value = <0xffffffff>; /* -1 */
  23. - debounce-interval: Debouncing interval time in milliseconds.
  24. If not specified defaults to 5.
  25. - wakeup-source: Boolean, button can wake-up the system.
  26. (Legacy property supported: "gpio-key,wakeup")
  27. Example nodes:
  28. gpio_keys_polled {
  29. compatible = "gpio-keys-polled";
  30. #address-cells = <1>;
  31. #size-cells = <0>;
  32. poll-interval = <100>;
  33. autorepeat;
  34. button@21 {
  35. label = "GPIO Key UP";
  36. linux,code = <103>;
  37. gpios = <&gpio1 0 1>;
  38. };
  39. ...