RE: [PATCH] FunctionFS based PTP-Gadget driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Friday, January 28, 2011 10:41 AM Guennadi Liakhovetski wrote:

> On Fri, 28 Jan 2011, Marek Szyprowski wrote:
> 
> > Hello!
> >
> > 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/

The patch is huge, but it mainly removes all dead code that is not needed with
functionfs interface, because functionfs moves handling of all common usb
requrests into kernel space, to composite gadget framework. Also all the code
that did controller/endpoint auto detection has been removed, because functionfs
handles this inside the kernel (and does it much better btw). 

I think that it should be possible to create a version that supports both
interfaces. Everything besides registration and ep0 handling is the same in
functionfs and gadgetfs. 

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux