On Mon, 29 Jan 2007, Oleg Verych wrote:

> Maybe i'm wrong with fast solution proposing. I want them, because
> it seems, that current binding of device (with IDs,#confs,#interfs) to
> (USB interface) driver is done after guessing device's setup (default
> is conf#1, interface#1, i think).

Probing and binding of the USB interface drivers is done while installing
a device configuration, yes.  (Before a configuration is selected 
there are no interfaces -- hence no need for interface drivers!)

However probing and binding of the USB device driver is done before
installing the configuration.  In fact, it is the USB device driver's job
to choose and install a configuration.  That's what "generic" does.

> What if one-prupose device, like ti-usb-serial require its one operation
> in different setup, and driver's author know it? I would like to have
> such _option_, as device driver _have_ option to choose device it can
> talk to -- ID tables.

You _do_ have the option -- you can call usb_driver_set_configuration().
Alternatively, you can try to write a new USB device driver in place of 
the "generic" one.  Or you can add special-case code to the 
choose_configuration() routine in generic.c.


On Mon, 29 Jan 2007, Oliver Neukum wrote:

> Am Montag, 29. Januar 2007 17:10 schrieb Oleg Verych:
> > Also, i think usb_set_configuration() must be renamed to
>
> There you have a point. It looks like a generally callable API.

While it may not be generally callable (it isn't EXPORT'ed, for instance), 
it is callable through more pathways than just sysfs: It is called by the 
"generic" driver and it can be called through usbfs.

> > sysfs_usb_set_coniguration(). One, that you have wrote for drivers,
> > and such approach must be removed. 100% configured device, must be
> > delivered to (USB interface) driver, and if this driver wants to have
> > {conf#n, interface#k}, please do as it wants on higher levels of setup.
>
> Don't we get all that if we try all configurations currently within budget?

How could you try all configurations?  How would you know when to switch 
from one configuration to the next, or when to stop switching?  What would 
you do if the user set a configuration while you were in the middle of 
trying them all?

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to