gpio_keys.h 830 B

12345678910111213141516171819202122232425262728
  1. #ifndef _GPIO_KEYS_H
  2. #define _GPIO_KEYS_H
  3. struct gpio_keys_button {
  4. /* Configuration parameters */
  5. unsigned int code; /* input event code (KEY_*, SW_*) */
  6. int gpio;
  7. int active_low;
  8. const char *desc;
  9. unsigned int type; /* input event type (EV_KEY, EV_SW, EV_ABS) */
  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. int value; /* axis value for EV_ABS */
  14. };
  15. struct gpio_keys_platform_data {
  16. struct gpio_keys_button *buttons;
  17. int nbuttons;
  18. unsigned int poll_interval; /* polling interval in msecs -
  19. for polling driver only */
  20. unsigned int rep:1; /* enable input subsystem auto repeat */
  21. int (*enable)(struct device *dev);
  22. void (*disable)(struct device *dev);
  23. const char *name; /* input device name */
  24. };
  25. #endif