Linux 6.13-rc4
[linux.git] / arch / sh / include / asm / push-switch.h
blobc5f072572fd18a0b999b701e1cb2c891acd0cce1
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SH_PUSH_SWITCH_H
3 #define __ASM_SH_PUSH_SWITCH_H
5 #include <linux/timer.h>
6 #include <linux/interrupt.h>
7 #include <linux/workqueue.h>
8 #include <linux/platform_device.h>
10 struct push_switch {
11 /* switch state */
12 unsigned int state:1;
13 /* debounce timer */
14 struct timer_list debounce;
15 /* workqueue */
16 struct work_struct work;
17 /* platform device, for workqueue handler */
18 struct platform_device *pdev;
21 struct push_switch_platform_info {
22 /* IRQ handler */
23 irqreturn_t (*irq_handler)(int irq, void *data);
24 /* Special IRQ flags */
25 unsigned int irq_flags;
26 /* Bit location of switch */
27 unsigned int bit;
28 /* Symbolic switch name */
29 const char *name;
32 #endif /* __ASM_SH_PUSH_SWITCH_H */