|
|
|
Re: User-space driver: order of uevents vs usbfs, claiming devices, and configurations | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Am Donnerstag 11 Oktober 2007 schrieb Phil Endecott:> Hi Oliver, thanks for the quick reply.> > Oliver Neukum wrote:> > Am Donnerstag 11 Oktober 2007 schrieb Phil Endecott:> >> Claiming devices: I understand how the usb core offers new devices to > >> kernel drivers based on the struct usb_device_id. Is there any way for > >> my user-space driver to influence this process? (A sufficient solution > >> for me for the time being would be a way to temporarily disable the > >> kernel matching while my user-space code is running; for example, I'd > >> be happy to load a small kernel module that clobbers the existing > >> matching somehow.)> >> > You can unbind a device from its driven with an ioctl through usbfs.> > OK; is it one of the ones listed at the end of usbdevice_fs.h ? I > don't see an obvious one...
/* disconnect kernel driver from interface */ case USBDEVFS_DISCONNECT: if (intf->dev.driver) { driver = to_usb_driver(intf->dev.driver); dev_dbg (&intf->dev, "disconnect by usbfs\n"); usb_driver_release_interface(driver, intf); } else retval = -ENODATA; break;
/* let kernel drivers try to (re)bind to the interface */ case USBDEVFS_CONNECT: usb_unlock_device(ps->dev); retval = bus_rescan_devices(intf->dev.bus); usb_lock_device(ps->dev); break;
Regards Oliver
-------------------------------------------------------------------------This SF.net email is sponsored by: Splunk Inc.Still grepping through log files to find problems? Stop.Now Search log events and configuration files using AJAX and a browser.Download your FREE copy of Splunk now >> http://get.splunk.com/_______________________________________________Linux-usb-users@xxxxxxxxxxxxxxxxxxxxxxx unsubscribe, use the last form field at:https://lists.sourceforge.net/lists/listinfo/linux-usb-users
[Linux USB] [Linux USB Devel] [Video for Linux] [Linux Audio Users] [Photo] [Yosemite News] [Yosemite Photos] [Video Projectors] [PDAs] [Free Online Dating] [Hacking TiVo] [Linux Kernel] [Linux SCSI] [XFree86] [Devices] [Big List of Linux Books] [16.7MP]