From eea3860a3795c78ee4e561e4032e36201fb3c0f0 Mon Sep 17 00:00:00 2001 From: James Lamanna Date: Mon, 26 Jan 2004 15:16:54 +0100 Subject: input: Add a new ioctl to hiddev, which allows multiple usages to be set in a single request. Also fixes sizes of fields in hiddev structs to use _uXX types. --- include/linux/hiddev.h | 74 +++++++++++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 31 deletions(-) (limited to 'include') diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h index 9e6d27476a74..75c1fa0d2189 100644 --- a/include/linux/hiddev.h +++ b/include/linux/hiddev.h @@ -39,33 +39,33 @@ struct hiddev_event { }; struct hiddev_devinfo { - unsigned int bustype; - unsigned int busnum; - unsigned int devnum; - unsigned int ifnum; - short vendor; - short product; - short version; - unsigned num_applications; + __u32 bustype; + __u32 busnum; + __u32 devnum; + __u32 ifnum; + __s16 vendor; + __s16 product; + __s16 version; + __u32 num_applications; }; struct hiddev_collection_info { - unsigned index; - unsigned type; - unsigned usage; - unsigned level; + __u32 index; + __u32 type; + __u32 usage; + __u32 level; }; #define HID_STRING_SIZE 256 struct hiddev_string_descriptor { - int index; + __s32 index; char value[HID_STRING_SIZE]; }; struct hiddev_report_info { - unsigned report_type; - unsigned report_id; - unsigned num_fields; + __u32 report_type; + __u32 report_id; + __u32 num_fields; }; /* To do a GUSAGE/SUSAGE, fill in at least usage_code, report_type and @@ -88,20 +88,20 @@ struct hiddev_report_info { #define HID_REPORT_TYPE_MAX 3 struct hiddev_field_info { - unsigned report_type; - unsigned report_id; - unsigned field_index; - unsigned maxusage; - unsigned flags; - unsigned physical; /* physical usage for this field */ - unsigned logical; /* logical usage for this field */ - unsigned application; /* application usage for this field */ + __u32 report_type; + __u32 report_id; + __u32 field_index; + __u32 maxusage; + __u32 flags; + __u32 physical; /* physical usage for this field */ + __u32 logical; /* logical usage for this field */ + __u32 application; /* application usage for this field */ __s32 logical_minimum; __s32 logical_maximum; __s32 physical_minimum; __s32 physical_maximum; - unsigned unit_exponent; - unsigned unit; + __u32 unit_exponent; + __u32 unit; }; /* Fill in report_type, report_id and field_index to get the information on a @@ -118,14 +118,22 @@ struct hiddev_field_info { #define HID_FIELD_BUFFERED_BYTE 0x100 struct hiddev_usage_ref { - unsigned report_type; - unsigned report_id; - unsigned field_index; - unsigned usage_index; - unsigned usage_code; + __u32 report_type; + __u32 report_id; + __u32 field_index; + __u32 usage_index; + __u32 usage_code; __s32 value; }; +/* hiddev_usage_ref_multi is used for sending multiple bytes to a control. + * It really manifests itself as setting the value of consecutive usages */ +struct hiddev_usage_ref_multi { + struct hiddev_usage_ref uref; + __u32 num_values; + __s32 values[HID_MAX_USAGES]; +}; + /* FIELD_INDEX_NONE is returned in read() data from the kernel when flags * is set to (HIDDEV_FLAG_UREF | HIDDEV_FLAG_REPORT) and a new report has * been sent by the device @@ -161,6 +169,10 @@ struct hiddev_usage_ref { #define HIDIOCGCOLLECTIONINFO _IOWR('H', 0x11, struct hiddev_collection_info) #define HIDIOCGPHYS(len) _IOC(_IOC_READ, 'H', 0x12, len) +/* For writing/reading to multiple/consecutive usages */ +#define HIDIOCGUSAGES _IOWR('H', 0x13, struct hiddev_usage_ref_multi) +#define HIDIOCSUSAGES _IOW('H', 0x14, struct hiddev_usage_ref_multi) + /* * Flags to be used in HIDIOCSFLAG */ -- cgit v1.2.3 From 99f30a27d75b5b3a9a18ce193b792f553ec2eb2d Mon Sep 17 00:00:00 2001 From: Aristeu Sergio Rozanski Filho Date: Tue, 27 Jan 2004 23:01:27 +0100 Subject: input: Remove the obsolete "busmouse.c" helper driver. --- arch/arm26/Kconfig | 5 ----- drivers/char/Kconfig | 24 ------------------------ drivers/char/Makefile | 1 - include/linux/miscdevice.h | 1 - 4 files changed, 31 deletions(-) (limited to 'include') diff --git a/arch/arm26/Kconfig b/arch/arm26/Kconfig index 05a9a2e55667..2862f0afa2cb 100644 --- a/arch/arm26/Kconfig +++ b/arch/arm26/Kconfig @@ -216,11 +216,6 @@ source "drivers/input/Kconfig" source "drivers/char/Kconfig" -config KBDMOUSE - bool - depends on ARCH_ACORN && BUSMOUSE=y - default y - source "drivers/media/Kconfig" source "fs/Kconfig" diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 4afb1bb01e83..8b7b63ea9690 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -588,30 +588,6 @@ config PC9800_OLDLP_CONSOLE bool "Support for console on line printer" depends on PC9800_OLDLP - -menu "Mice" - -config BUSMOUSE - tristate "Bus Mouse Support" - ---help--- - Say Y here if your machine has a bus mouse as opposed to a serial - mouse. Most people have a regular serial MouseSystem or - Microsoft mouse (made by Logitech) that plugs into a COM port - (rectangular with 9 or 25 pins). These people say N here. - - If you have a laptop, you either have to check the documentation or - experiment a bit to find out whether the trackball is a serial mouse - or not; it's best to say Y here for you. - - This is the generic bus mouse driver code. If you have a bus mouse, - you will have to say Y here and also to the specific driver for your - mouse below. - - To compile this driver as a module, choose M here: the - module will be called busmouse. - -endmenu - config QIC02_TAPE tristate "QIC-02 tape support" help diff --git a/drivers/char/Makefile b/drivers/char/Makefile index ca8aa47ef43e..130df75eb098 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile @@ -49,7 +49,6 @@ obj-$(CONFIG_PRINTER) += lp.o obj-$(CONFIG_TIPAR) += tipar.o obj-$(CONFIG_PC9800_OLDLP) += lp_old98.o -obj-$(CONFIG_BUSMOUSE) += busmouse.o obj-$(CONFIG_DTLK) += dtlk.o obj-$(CONFIG_R3964) += n_r3964.o obj-$(CONFIG_APPLICOM) += applicom.o diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index 98f61665d4c2..89b87832c769 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h @@ -3,7 +3,6 @@ #include #include -#define BUSMOUSE_MINOR 0 #define PSMOUSE_MINOR 1 #define MS_BUSMOUSE_MINOR 2 #define ATIXL_BUSMOUSE_MINOR 3 -- cgit v1.2.3