gpio_keys.txt 942 B

123456789101112131415161718192021222324252627282930313233343536
  1. Device-Tree bindings for input/gpio_keys.c keyboard driver
  2. Required properties:
  3. - compatible = "gpio-keys";
  4. Optional properties:
  5. - autorepeat: Boolean, Enable auto repeat feature of Linux input
  6. subsystem.
  7. Each button (key) is represented as a sub-node of "gpio-keys":
  8. Subnode properties:
  9. - gpios: OF device-tree gpio specification.
  10. - label: Descriptive name of the key.
  11. - linux,code: Keycode to emit.
  12. Optional subnode-properties:
  13. - linux,input-type: Specify event type this button/key generates.
  14. If not specified defaults to <1> == EV_KEY.
  15. - debounce-interval: Debouncing interval time in milliseconds.
  16. If not specified defaults to 5.
  17. - gpio-key,wakeup: Boolean, button can wake-up the system.
  18. Example nodes:
  19. gpio_keys {
  20. compatible = "gpio-keys";
  21. #address-cells = <1>;
  22. #size-cells = <0>;
  23. autorepeat;
  24. button@21 {
  25. label = "GPIO Key UP";
  26. linux,code = <103>;
  27. gpios = <&gpio1 0 1>;
  28. };
  29. ...