Re: User-space driver: order of uevents vs usbfs, claiming devices, and configurations

Oliver Neukum <[email protected]> Thu, 11 Oct 2007 17:27:46 +0200
Newsgroups gmane.linux.usb.user
Message-ID <[email protected]>
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/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users