From: Mikkel Krautz <krautz@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: greg@kroah.com, vojtech@suse.cz
Subject: Re: [PATCH] hid-core: Configurable USB HID Mouse Interrupt Polling Interval
Date: Sun, 19 Dec 2004 01:52:06 +0000 [thread overview]
Message-ID: <d4b385204121817521b0df40f@mail.gmail.com> (raw)
In-Reply-To: <20041218165331.GA7737@kroah.com>
On Sat, 18 Dec 2004 08:53:31 -0800, Greg KH <greg@kroah.com> wrote:
> On Sat, Dec 18, 2004 at 05:39:25PM +0000, Mikkel Krautz wrote:
> > On Fri, 17 Dec 2004 18:59:48 -0800, Greg KH <greg@kroah.com> wrote:
> > > What about makeing it a module paramater then, that is exported to
> > > sysfs? That makes it easier to adjust on the fly (before the mouse is
> > > inserted), and doesn't require the kernel to be rebuilt.
> >
> > I really like the idea. I'm start to think that this is the ideal way to
> > accomplish this.
> >
> > Here's a new patch. Let's hope it doesn't wrap!
>
> It was eaten :(
>
> > module_init(hid_init);
> > module_exit(hid_exit);
> > +module_param(hid_mouse_polling_interval, int, 644);
>
> 0644, or use the proper #defines instead.
>
> thanks,
>
> greg k-h
>
Here's an updated version, with your and Marcel's suggestions:
Signed-off-by: Mikkel Krautz <krautz@gmail.com>
---
hid-core.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletion(-)
--- clean/drivers/usb/input/hid-core.c
+++ dirty/drviers/usb/input/hid-core.c
@@ -37,11 +37,12 @@
* 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 unsigned int hid_mousepoll_interval;
static char *hid_types[] = {"Device", "Pointer", "Mouse", "Device", "Joystick",
"Gamepad", "Keyboard", "Keypad", "Multi-Axis Controller"};
@@ -1663,6 +1664,11 @@
if ((endpoint->bmAttributes & 3) != 3) /* Not an interrupt endpoint */
continue;
+ /* Change the polling interval of mice. */
+ if (hid->collection->usage == HID_GD_MOUSE
+ && hid_mousepoll_interval > 0)
+ endpoint->bInterval = hid_mousepoll_interval;
+
/* handle potential highspeed HID correctly */
interval = endpoint->bInterval;
if (dev->speed == USB_SPEED_HIGH)
@@ -1910,6 +1916,7 @@
module_init(hid_init);
module_exit(hid_exit);
+module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
next prev parent reply other threads:[~2004-12-19 1:52 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-18 2:12 [PATCH] hid-core: Configurable USB HID Mouse Interrupt Polling Interval Mikkel Krautz
2004-12-18 0:43 ` Gene Heskett
2004-12-18 1:27 ` Greg KH
2004-12-18 4:22 ` Mikkel Krautz
2004-12-18 3:36 ` Gene Heskett
2004-12-18 4:42 ` Mikkel Krautz
2004-12-18 2:59 ` Greg KH
2004-12-18 4:55 ` Mikkel Krautz
2004-12-18 17:39 ` Mikkel Krautz
2004-12-18 15:40 ` Marcel Holtmann
2004-12-18 17:44 ` Mikkel Krautz
2004-12-18 16:53 ` Greg KH
2004-12-19 1:52 ` Mikkel Krautz [this message]
2005-02-06 19:07 ` Vojtech Pavlik
2005-02-06 20:00 ` Mikkel Krautz
-- strict thread matches above, loose matches on Subject: below --
2005-02-07 15:42 Mikkel Krautz
2005-02-07 15:44 Mikkel Krautz
2005-02-07 15:59 ` Randy.Dunlap
2005-02-07 17:16 ` Domen Puncer
2005-02-07 17:00 ` Randy.Dunlap
[not found] ` <20050207174303.GA3113@ucw.cz>
2005-02-07 17:51 ` Mikkel Krautz
2005-02-07 17:56 ` Mikkel Krautz
[not found] ` <20050207183818.GB2006@ucw.cz>
2005-02-07 18:41 ` Mikkel Krautz
2005-02-07 16:46 Mikkel Krautz
2005-02-07 18:57 Mikkel Krautz
2005-02-08 15:15 ` zyphr
2005-02-08 16:02 ` Oliver Neukum
2005-02-08 16:09 ` Vojtech Pavlik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d4b385204121817521b0df40f@mail.gmail.com \
--to=krautz@gmail.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox