USB: f_fs: the FunctionFS driver
The FunctionFS is a USB composite function that can be used with the composite framework to create an USB gadget. >From kernel point of view it is just a composite function with some unique behaviour. It may be added to an USB configuration only after the user space driver has registered by writing descriptors and strings (the user space program has to provide the same information that kernel level composite functions provide when they are added to the configuration). >From user space point of view it is a file system which when mounted provide an "ep0" file. User space driver need to write descriptors and strings to that file. It does not need to worry about endpoints, interfaces or strings numbers but simply provide descriptors such as if the function was the only one (endpoints and strings numbers starting from one and interface numbers starting from core). The FunctionFS changes numbers of those as needed also handling situation when numbers differ in different configurations. When descriptors and strings are written "ep#" files appear (one for each declared endpoint) which handle communication on a single endpoint. Again, FunctionFS takes care of the real numbers and changing of the configuration (which means that "ep1" file may be really mapped to (say) endpoint 3 (and when configuration changes to (say) endpoint 2)). "ep0" is used for receiving events and handling setup requests. When all files are closed the function disables itself. Signed-off-by:Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/f_fs.c
0 → 100644
This diff is collapsed.
include/linux/usb/functionfs.h
0 → 100644
-
mentioned in commit b44330f5
-
mentioned in commit 56583c94
-
mentioned in commit 001fc069
-
mentioned in commit clo/qsdk/oss/kernel/linux-msm@bf7ddf96
-
mentioned in commit clo/qsdk/oss/kernel/linux-msm@e9036e95
-
mentioned in commit 4976863a
-
mentioned in commit e8e8b24a
-
mentioned in commit 49849b6b
-
mentioned in commit 62484437
-
mentioned in commit facf353c
-
mentioned in commit a8d40942
-
mentioned in commit 6b4d1d89
-
mentioned in commit f1083864
-
mentioned in commit b29d2af5
-
mentioned in commit 250ac66f
Please register or sign in to comment