Re: Blacklisting a usbhid device

From: Adam Nielsen
Date: Tue Jul 21 2009 - 19:08:09 EST


> Any suggestions on how to either work within the usbhid framework or how
> to get usbhid to stop claiming the device?

>From userland you can get the usbhid driver to release the device like this:

cd /sys/bus/usb/drivers/usbhid
echo '9-1:1.0' > unbind

Where '9-1:1.0' is the device you want to release. Presumably you could do
the same thing on the kernel side when your driver is loaded. This would give
better functionality, in that the usbhid driver would handle basic
functionality if your driver isn't loaded, but as soon as your driver was
loaded the extra functionality would become available.

Of course this bypasses usbhid's functionality. I imagine it would be better
to write a hid driver and let usbhid handle the USB side of things. Have a
look in drivers/hid/ for some hid driver examples that do this.

Cheers,
Adam.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/