Linux USB driver probe not called if device already plugged

浪尽此生 提交于 2019-12-06 15:53:27

Almost all USB HID devices are automatically managed by usbhid driver. Try the following:

sudo rmmod usbhid
sudo insmod your_driver
sudo insmod usbhid

You probably need to unbind your device from usbhid and bind it to your driver:

  • try to find the thief driver in : /sys/bus/usb/drivers/usbhid/
  • unbind it : echo -n "1-1:1.0" > /sys/bus/usb/drivers/usbhid/unbind
  • bind your device :
    • echo <vendor> <product> > /sys/bus/usb/drivers/my_driver/new_id or if you already have a bus id :
    • echo -n "1-1:1.0" > /sys/bus/usb/drivers/my_driver/bind

see http://www.ha19.no/usb/ see http://lwn.net/Articles/143397/

Some software from us was opening the device from /proc/bus/usb and the device was claimed by the usbfs driver, so the new driver couldn't claim the device.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!