gpio_keys.h 715 B

1234567891011121314151617181920212223242526
  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 poll_interval; /* polling interval in msecs -
  18. for polling driver only */
  19. unsigned int rep:1; /* enable input subsystem auto repeat */
  20. int (*enable)(struct device *dev);
  21. void (*disable)(struct device *dev);
  22. };
  23. #endif