Hello, On Friday, January 28, 2011 11:15 AM Guennadi Liakhovetski wrote: > On Fri, 28 Jan 2011, Marek Szyprowski wrote: > > On Friday, January 28, 2011 10:41 AM Guennadi Liakhovetski wrote: > > > On Fri, 28 Jan 2011, Marek Szyprowski wrote: > > > > > > > I've ported PTP usb gadget driver created once by Guennadi Liakhovetski > > > > from gadgetfs interface to the new functionfs interface introduced a few > > > > months ago. I've based my work on the sources that are available on > > > > http://git.denx.de/?p=ptp-gadget.git;a=summary > > > > > > > > With functionfs interface one can create usb multifunction composite > > > > gadget with some functions implemented in kernel space (like USB > > > > Ethernet) and other (like the PTP) in userspace. > > > > > > Nice! Thanks a lot for the patch! However, you might appreciate, that > > > reviewing and testing this 1k-line patch wouldn't be very easy for me. It > > > is a huge change. Do I understand it right, that functionfs is replacing > > > the gadgetfs in the kernel? But we still have the "old" kernels around. > > > Would it be difficult to support both interfaces? Best with an automatic > > > detection of what's available on the system - shouldn't be too hard to > > > implement that - you've got both now. What do you think? > > > > Well, imho functionfs is not meant to replace gadgetfs. It is designed for > > a bit different use case, although one can just use g_ffs module with single > > interface configuration to replace gadgetfs module. > > > > Here are some mode details on functionfs interface: http://lwn.net/Articles/382480/ > > Yes, I've looked at one of them, and this: > > <quote> > Patches that follow implement the FunctionFS composite function that > is a conversion of GadgetFS to use the composite framework. > </quote> > > has confused me into thinking, that gadgetfs gets replaced by the > functionfs. Right, this might be confusing but in fact gadgetfs and functionfs have a lot in common. > If both of them are stayingm then it makes even more sense to > support both! Well, this depends on the Linux-USB maintainers. I don't want to speak about gadgetfs future on behalf of them :) > Since functionfs is superior, Nice to hear that :) Now it got much more powerful as PTP became the first real driver with complete source code. I hope it will be a reference implementation soon :) > we could make it the default > choice, if both are available on the system (is it possible to have > both?). You can insmod both, but only one can be active at the same time. > Otherwise fall back to gadgetfs. Maybe also provide a parameter to > force the use of gadgetfs even if both are available. Right, that should be possible. Best regards -- Marek Szyprowski Samsung Poland R&D Center -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html