]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - drivers/char/nwbutton.h
Merge tag 'mmc-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
[mirror_ubuntu-focal-kernel.git] / drivers / char / nwbutton.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
1da177e4
LT
2#ifndef __NWBUTTON_H
3#define __NWBUTTON_H
4
5/*
6 * NetWinder Button Driver-
7 * Copyright (C) Alex Holden <alex@linuxhacker.org> 1998, 1999.
8 */
9
10#ifdef __NWBUTTON_C /* Actually compiling the driver itself */
11
12/* Various defines: */
13
14#define NUM_PRESSES_REBOOT 2 /* How many presses to activate shutdown */
15#define BUTTON_DELAY 30 /* How many jiffies for sequence to end */
16#define VERSION "0.3" /* Driver version number */
17#define BUTTON_MINOR 158 /* Major 10, Minor 158, /dev/nwbutton */
18
19/* Structure definitions: */
20
21struct button_callback {
22 void (*callback) (void);
23 int count;
24};
25
26/* Function prototypes: */
27
24ed960a 28static void button_sequence_finished(struct timer_list *unused);
7d12e780 29static irqreturn_t button_handler (int irq, void *dev_id);
1da177e4
LT
30int button_init (void);
31int button_add_callback (void (*callback) (void), int count);
32int button_del_callback (void (*callback) (void));
33static void button_consume_callbacks (int bpcount);
34
35#else /* Not compiling the driver itself */
36
37extern int button_add_callback (void (*callback) (void), int count);
38extern int button_del_callback (void (*callback) (void));
39
40#endif /* __NWBUTTON_C */
41#endif /* __NWBUTTON_H */