I have done something similar before.   Perhaps let me explained my situation.

Linux have its default list of USB mouse drivers (well known VID/PID)
which it will load during bootup.   And so after plugging in my mouse,
and then using a userspace program to call libusb_claim_interface(), I
cannot claimed the interface because of a previously loaded mouse
driver.   (this is because the newly loaded mouse shared the same
VID/PID as the default kernel loaded driver)   So I used
libusb_detach_kernel_driver() to detach the kernel driver, and then
libusb_claim_interface() again to take control of the mouse.   From
thereon, the program can go into a polling loop to accept all input
from the USB devices via libusb_interrupt_transfer() etc....APIs.
Not sure if u have the same situation?

Thanks.

On Wed, Jan 20, 2010 at 8:54 PM, luca ellero <[email protected]> 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.
> Thanks
> Luca
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to [email protected]
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>



-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to