Commit 6a6bfca1 authored by Mikkel Krautz's avatar Mikkel Krautz Committed by Vojtech Pavlik

input: Make the polling interval for mice a configurable parameter

       of the HID driver. This is useful when a faster response
       from a mouse is beneficial, ie games.
Signed-off-by: default avatarMikkel Krautz <krautz@gmail.com>
Signed-off-by: default avatarVojtech Pavlik <vojtech@suse.cz>
parent b21ed8e4
......@@ -73,6 +73,7 @@ restrictions referred to are that the relevant option is valid if:
SWSUSP Software suspension is enabled.
TS Appropriate touchscreen support is enabled.
USB USB support is enabled.
USBHID USB Human Interface Device support is enabled.
V4L Video For Linux support is enabled.
VGA The VGA console has been enabled.
VT Virtual terminal support is enabled.
......@@ -1396,6 +1397,9 @@ running once the system is up.
Format: <io>,<irq>
usb-handoff [HW] Enable early USB BIOS -> OS handoff
usbhid.mousepoll=
[USBHID] The interval which mice are to be polled at.
video= [FB] Frame buffer configuration
See Documentation/fb/modedb.txt.
......
......@@ -37,13 +37,20 @@
* Version Information
*/
#define DRIVER_VERSION "v2.0"
#define DRIVER_VERSION "v2.01"
#define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik"
#define DRIVER_DESC "USB HID core driver"
#define DRIVER_LICENSE "GPL"
static char *hid_types[] = {"Device", "Pointer", "Mouse", "Device", "Joystick",
"Gamepad", "Keyboard", "Keypad", "Multi-Axis Controller"};
/*
* Module parameters.
*/
static unsigned int hid_mousepoll_interval;
module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644);
MODULE_PARM_DESC(mousepoll, "Polling interval of mice");
/*
* Register a new report for a device.
......@@ -1694,6 +1701,10 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
if (dev->speed == USB_SPEED_HIGH)
interval = 1 << (interval - 1);
/* Change the polling interval of mice. */
if (hid->collection->usage == HID_GD_MOUSE && hid_mousepoll_interval > 0)
interval = hid_mousepoll_interval;
if (endpoint->bEndpointAddress & USB_DIR_IN) {
if (hid->urbin)
continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment