On Sunday 28 January 2007 12:54 pm, Alan Stern wrote: > On Sun, 28 Jan 2007, jing xiang wrote: > > > Got the idea. But could we re-use the current gadget drivers in such > > architecture? Is it possible to make the composite layer transparent > > to the function drivers?
Those are the two questions; see below for answers ... > > In theory, the composite layer could get all > > the descriptor/configuration/interface information from the function > > drivers. Thus we could make a little modification to the gadget > > drivers, and compose different kind of composite devices easily. "Easily" in some cases. For example, you may have a peripheral controller that doesn't support the composition you want. > > And > > for gadget/function drivers, it could either be one pure function or > > combine with others to form composite device. We have tried to > > implement such composite on PXA27x UDC, but met problems as mentioned > > in last mail. > > In principle this is possible. It's easy to see why: If you can combine > two function drivers with each other to make a composite gadget, then you > combine one of them with nothing, resulting in a non-composite gadget with > only one function. > > However none of the existing drivers were written with this sort of thing > in mind. They would have to be modified before they could fit into the > composite-gadget scenario. So the answer to your first question is "No", "No, not as-is ... they need modification first. Most of the existing code could be easily modified though." The non-control endpoints should work almost identically, and that's the bulk of the functionality. > and the answer to the second question is "Yes, but only if the function > drivers are written properly". Erm, "No, because the function drivers _know_ they are not taking over ownership of the whole gadget, since they are making an effort to share it ... and such sharing is never needed without such a layer." - Dave > > 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