[libhid-discuss] Preventing HID driver attachment

Charles Lepple clepple at ghz.cc
Fri Jul 22 10:44:13 UTC 2011


On Jul 21, 2011, at 5:23 PM, Avishay Orpaz wrote:

> Hi
> I have a device that exposes two interfaces - one HID and one mass  
> storage. I would like to know if there is a way to prevent the  
> attachment of a HID driver in linux. Is it possible to do so while  
> keeping the other interface ability to be attached to its standard  
> driver?

You might get more details if you post on the Linux USB mailing list  
(and mention a specific kernel version), but I think the blacklists  
are per-interface.

If not, you can detach the kernel drivers after-the-fact. libhid has a  
tool called "libhid-detach-device" which could be expanded to look at  
interfaces other than 0. The core functionality is in  
hid_force_open(), which calls the libusb function  
usb_detach_kernel_driver_np().

-- 
Charles Lepple



More information about the libhid-discuss mailing list