push-switch.h 604 B

12345678910111213141516171819202122232425262728
  1. #ifndef __ASM_SH_PUSH_SWITCH_H
  2. #define __ASM_SH_PUSH_SWITCH_H
  3. #include <linux/timer.h>
  4. #include <linux/interrupt.h>
  5. #include <linux/workqueue.h>
  6. struct push_switch {
  7. /* switch state */
  8. unsigned int state:1;
  9. /* debounce timer */
  10. struct timer_list debounce;
  11. /* workqueue */
  12. struct work_struct work;
  13. };
  14. struct push_switch_platform_info {
  15. /* IRQ handler */
  16. irqreturn_t (*irq_handler)(int irq, void *data);
  17. /* Special IRQ flags */
  18. unsigned int irq_flags;
  19. /* Bit location of switch */
  20. unsigned int bit;
  21. /* Symbolic switch name */
  22. const char *name;
  23. };
  24. #endif /* __ASM_SH_PUSH_SWITCH_H */