gpio_keys.h 620 B

123456789101112131415161718192021222324
  1. #ifndef _GPIO_KEYS_H
  2. #define _GPIO_KEYS_H
  3. struct gpio_keys_button {
  4. /* Configuration parameters */
  5. int code; /* input event code (KEY_*, SW_*) */
  6. int gpio;
  7. int active_low;
  8. char *desc;
  9. int type; /* input event type (EV_KEY, EV_SW) */
  10. int wakeup; /* configure the button as a wake-up source */
  11. int debounce_interval; /* debounce ticks interval in msecs */
  12. bool can_disable;
  13. };
  14. struct gpio_keys_platform_data {
  15. struct gpio_keys_button *buttons;
  16. int nbuttons;
  17. unsigned int rep:1; /* enable input subsystem auto repeat */
  18. int (*enable)(struct device *dev);
  19. void (*disable)(struct device *dev);
  20. };
  21. #endif