diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-06-19 22:45:37 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-06-19 22:45:37 +0000 |
commit | 6d403070f28cd44860fdb3a53be5da0275c65cf4 (patch) | |
tree | 0d0e7fe7b5fb7568d19e11d7d862b77a866ce081 /include/linux/input.h | |
parent | ecf1bf5f6c2e668d03b0a9fb026db7aa41e292e1 (diff) |
Merge with 2.4.0-test1-ac21 + pile of MIPS cleanups to make merging
possible. Chainsawed RM200 kernel to compile again. Jazz machine
status unknown.
Diffstat (limited to 'include/linux/input.h')
-rw-r--r-- | include/linux/input.h | 65 |
1 files changed, 44 insertions, 21 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index d43d1e5a7..6d19fc2a9 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -2,9 +2,9 @@ #define _INPUT_H /* - * input.h Version 0.1 + * $Id: input.h,v 1.13 2000/05/29 10:54:53 vojtech Exp $ * - * Copyright (c) 1999 Vojtech Pavlik + * Copyright (c) 1999-2000 Vojtech Pavlik * * Sponsored by SuSE */ @@ -33,6 +33,7 @@ #include <linux/time.h> #else #include <sys/time.h> +#include <sys/ioctl.h> #endif /* @@ -47,16 +48,6 @@ struct input_event { }; /* - * The device ID structure; - */ - -struct input_id { - __u16 bus; - __u16 vendor; - __u16 product; -}; - -/* * Protocol version. */ @@ -66,14 +57,17 @@ struct input_id { * IOCTLs (0x00 - 0x7f) */ -#define EVIOCGVERSION _IOR('E', 0x01, __u32) /* get driver version */ -#define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ +#define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ +#define EVIOCGID _IOR('E', 0x02, short[4]) /* get device ID */ #define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */ #define EVIOCSREP _IOW('E', 0x03, int[2]) /* get repeat settings */ -#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x03, len) /* get device name */ +#define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */ +#define EVIOCSKEYCODE _IOW('E', 0x04, int[2]) /* set keycode */ +#define EVIOCGKEY _IOR('E', 0x05, int[2]) /* get key value */ +#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ + #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ -#define EVIOCGABSLIM(num) _IOR('E', 0x40 + num, int[4]) /* get abs event limits */ -#define EVIOCGABS(num) _IOR('E', 0x80 + num, int) /* get abs value */ +#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, int[5]) /* get abs value/limits */ /* * Event types @@ -308,6 +302,7 @@ struct input_id { #define BTN_BASE3 0x128 #define BTN_BASE4 0x129 #define BTN_BASE5 0x12a +#define BTN_BASE6 0x12b #define BTN_GAMEPAD 0x130 #define BTN_A 0x130 @@ -364,6 +359,8 @@ struct input_id { #define ABS_RZ 0x05 #define ABS_THROTTLE 0x06 #define ABS_RUDDER 0x07 +#define ABS_TL 0x08 +#define ABS_TR 0x09 #define ABS_HAT0X 0x10 #define ABS_HAT0Y 0x11 #define ABS_HAT1X 0x12 @@ -406,6 +403,27 @@ struct input_id { #define SND_BELL 0x01 #define SND_MAX 0x07 +/* + * IDs. + */ + +#define ID_BUS 0 +#define ID_VENDOR 1 +#define ID_PRODUCT 2 +#define ID_VERSION 3 + +#define BUS_PCI 0x01 +#define BUS_ISAPNP 0x02 +#define BUS_USB 0x03 + +#define BUS_ISA 0x10 +#define BUS_I8042 0x11 +#define BUS_XTKBD 0x12 +#define BUS_RS232 0x13 +#define BUS_GAMEPORT 0x14 +#define BUS_PARPORT 0x15 +#define BUS_AMIGA 0x16 + #ifdef __KERNEL__ /* @@ -425,7 +443,10 @@ struct input_dev { int number; char *name; - struct input_id id; + unsigned short idbus; + unsigned short idvendor; + unsigned short idproduct; + unsigned short idversion; unsigned long evbit[NBITS(EV_MAX)]; unsigned long keybit[NBITS(KEY_MAX)]; @@ -434,7 +455,10 @@ struct input_dev { unsigned long ledbit[NBITS(LED_MAX)]; unsigned long sndbit[NBITS(SND_MAX)]; - unsigned char *keycode; + unsigned int keycodemax; + unsigned int keycodesize; + void *keycode; + unsigned int repeat_key; struct timer_list timer; @@ -500,8 +524,7 @@ void input_unregister_minor(devfs_handle_t handle); void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); -#define input_report_key(a,b,c) input_event(a, EV_KEY, b, c) -#define input_report_btn(a,b,c) input_event(a, EV_KEY, b, !!(c)) +#define input_report_key(a,b,c) input_event(a, EV_KEY, b, !!(c)) #define input_report_rel(a,b,c) input_event(a, EV_REL, b, c) #define input_report_abs(a,b,c) input_event(a, EV_ABS, b, c) |