| Paul Mundt | 9f5e8ee | 2006-11-24 11:22:57 +0900 | [diff] [blame] | 1 | #ifndef __ASM_SH_PUSH_SWITCH_H | 
 | 2 | #define __ASM_SH_PUSH_SWITCH_H | 
 | 3 |  | 
 | 4 | #include <linux/timer.h> | 
 | 5 | #include <linux/interrupt.h> | 
 | 6 | #include <linux/workqueue.h> | 
| Paul Mundt | fce3a24 | 2006-12-07 13:20:58 +0900 | [diff] [blame] | 7 | #include <linux/platform_device.h> | 
| Paul Mundt | 9f5e8ee | 2006-11-24 11:22:57 +0900 | [diff] [blame] | 8 |  | 
 | 9 | struct push_switch { | 
 | 10 | 	/* switch state */ | 
 | 11 | 	unsigned int		state:1; | 
 | 12 | 	/* debounce timer */ | 
 | 13 | 	struct timer_list	debounce; | 
 | 14 | 	/* workqueue */ | 
 | 15 | 	struct work_struct	work; | 
| Paul Mundt | fce3a24 | 2006-12-07 13:20:58 +0900 | [diff] [blame] | 16 | 	/* platform device, for workqueue handler */ | 
 | 17 | 	struct platform_device	*pdev; | 
| Paul Mundt | 9f5e8ee | 2006-11-24 11:22:57 +0900 | [diff] [blame] | 18 | }; | 
 | 19 |  | 
 | 20 | struct push_switch_platform_info { | 
 | 21 | 	/* IRQ handler */ | 
 | 22 | 	irqreturn_t		(*irq_handler)(int irq, void *data); | 
 | 23 | 	/* Special IRQ flags */ | 
 | 24 | 	unsigned int		irq_flags; | 
 | 25 | 	/* Bit location of switch */ | 
 | 26 | 	unsigned int		bit; | 
 | 27 | 	/* Symbolic switch name */ | 
 | 28 | 	const char		*name; | 
 | 29 | }; | 
 | 30 |  | 
 | 31 | #endif /* __ASM_SH_PUSH_SWITCH_H */ |