On Saturday 02 February 2008 23:46:29 Greg KH wrote: > On Sat, Feb 02, 2008 at 11:31:02PM +0100, Michael Buesch wrote: > > Hi, > > > > I am implementing a driver for Razer USB mice. These > > mice are standard HID input devices with additional features > > accessible through USB control commands. > > > > My current prototype driver does this access in userspace > > via libusb, but this brings all kinds of issues while the > > kernel driver and other userspace software is also accessing > > the device concurrently. > > > > So I was going to implement a small optional kernel HAL module > > for this, which exports the device features through sysfs. > > This module will be an optional extension to the usbmouse HID > > module. So when disabled in kconfig the code will be no different > > from current code. If enabled, it would simply call on probe into the > > razer addon and check if this is a razer mouse. If true, export the > > sysfs interface. If not, do nothing and don't touch anything of the > > stuff. > > > > Does this sound reasonable or does someone have a better idea > > for implementing this? > > Can't we get access to these new types of events through the raw "evdev" > driver? That way no new userspace interface would have to be created, > just some new HID mappings for what the company added to their devices.
Hm, does this provide some locking against the HID mouse IRQ routine? I do have some concurrency trouble in the current userspace HAL implementation (see other mail) that I workaround by simply sending commands a few times. That's no solution, of course. We should use locking and make sure we are not interrupted by some polling or whatever (not 100% sure what is going on, yet) while sending the commands. Additionally, the device seems to send some proprietary data, that I'd like to have access to in the data[0] byte of the IRQ urb. > That is assuming the company did "standard" HID things... I'm afraid they didn't completely do this. See my other mail. -- Greetings Michael. - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
