Greg KH ha scritto:
On Wed, Jan 20, 2010 at 01:54:08PM +0100, luca ellero wrote:
Hi everybody,
I'm writing a driver that use a USB mouse as a minimal keyboard (binding
mouse buttons to some useful keys: Enter, Tab, ESC or others).
The problem is the USB mouse driver (integrated into the kernel) takes over
the mouse device and so my driver is never bind to it.
Now, I know how to blacklist a driver if it was a module, but I wonder if
there is some easy way to do the same with a "compiled in" driver without
recompiling the kernel.
The hid driver has a quirks file you can write to which will keep it
from binding to your device.
You can also unbind a driver from a device by hand through the 'unbind'
file in sysfs in the driver's directory.
In the end, just send a patch to the hid maintainer to add your device
to the quirk list so it doesn't bind to it so you don't have to do this.
good luck,
greg k-h
Thank you Greg for you information.
I will try sysfs unbind feature.
I think sending a patch to hid maintainer is not feasible in this case,
because I use a standard mouse for my experiments. So blacklisting it
means that all mice of that kind will never work (with usbhid) in the
future. Is this right?
regards
Luca
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ