gpio-keys-polled.txt 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. poll-interval = <100>;
  31. autorepeat;
  32. button21 {
  33. label = "GPIO Key UP";
  34. linux,code = <103>;
  35. gpios = <&gpio1 0 1>;
  36. };
  37. ...