gpio-keys.txt 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. - label: String, name of the input device.
  8. Each button (key) is represented as a sub-node of "gpio-keys":
  9. Subnode properties:
  10. - gpios: OF device-tree gpio specification.
  11. - interrupts: the interrupt line for that input.
  12. - label: Descriptive name of the key.
  13. - linux,code: Keycode to emit.
  14. Note that either "interrupts" or "gpios" properties can be omitted, but not
  15. both at the same time. Specifying both properties is allowed.
  16. Optional subnode-properties:
  17. - linux,input-type: Specify event type this button/key generates.
  18. If not specified defaults to <1> == EV_KEY.
  19. - debounce-interval: Debouncing interval time in milliseconds.
  20. If not specified defaults to 5.
  21. - wakeup-source: Boolean, button can wake-up the system.
  22. (Legacy property supported: "gpio-key,wakeup")
  23. - linux,can-disable: Boolean, indicates that button is connected
  24. to dedicated (not shared) interrupt which can be disabled to
  25. suppress events from the button.
  26. Example nodes:
  27. gpio-keys {
  28. compatible = "gpio-keys";
  29. autorepeat;
  30. up {
  31. label = "GPIO Key UP";
  32. linux,code = <103>;
  33. gpios = <&gpio1 0 1>;
  34. };
  35. down {
  36. label = "GPIO Key DOWN";
  37. linux,code = <108>;
  38. interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
  39. };
  40. ...