4 * User level driver support for input subsystem
6 * Heavily based on evdev.c by Vojtech Pavlik
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
26 * - first public version
29 #define UINPUT_MINOR 223
30 #define UINPUT_NAME "uinput"
31 #define UINPUT_BUFFER_SIZE 16
33 /* state flags => bit index for {set|clear|test}_bit ops */
34 #define UIST_CREATED 0
36 struct uinput_device {
37 struct input_dev *dev;
39 wait_queue_head_t waitq;
43 struct input_event buff[UINPUT_BUFFER_SIZE];
45 #endif /* __KERNEL__ */
48 #define UINPUT_IOCTL_BASE 'U'
49 #define UI_DEV_CREATE _IO(UINPUT_IOCTL_BASE, 1)
50 #define UI_DEV_DESTROY _IO(UINPUT_IOCTL_BASE, 2)
51 #define UI_SET_EVBIT _IOW(UINPUT_IOCTL_BASE, 100, int)
52 #define UI_SET_KEYBIT _IOW(UINPUT_IOCTL_BASE, 101, int)
53 #define UI_SET_RELBIT _IOW(UINPUT_IOCTL_BASE, 102, int)
54 #define UI_SET_ABSBIT _IOW(UINPUT_IOCTL_BASE, 103, int)
55 #define UI_SET_MSCBIT _IOW(UINPUT_IOCTL_BASE, 104, int)
56 #define UI_SET_LEDBIT _IOW(UINPUT_IOCTL_BASE, 105, int)
57 #define UI_SET_SNDBIT _IOW(UINPUT_IOCTL_BASE, 106, int)
58 #define UI_SET_FFBIT _IOW(UINPUT_IOCTL_BASE, 107, int)
61 #define NBITS(x) ((((x)-1)/(sizeof(long)*8))+1)
64 #define UINPUT_MAX_NAME_SIZE 80
65 struct uinput_user_dev {
66 char name[UINPUT_MAX_NAME_SIZE];
69 int absmax[ABS_MAX + 1];
70 int absmin[ABS_MAX + 1];
71 int absfuzz[ABS_MAX + 1];
72 int absflat[ABS_MAX + 1];
74 #endif /* __UINPUT_H_ */