linux/drivers/usb/gadget/function
Robert Baldyga 1b0bf88fd8 usb: gadget: f_fs: virtual endpoint address mapping
This patch introduces virtual endpoint address mapping. It separates
function logic form physical endpoint addresses making it more hardware
independent.

Following modifications changes user space API, so to enable them user
have to switch on the FUNCTIONFS_VIRTUAL_ADDR flag in descriptors.

Endpoints are now refered using virtual endpoint addresses chosen by
user in endpoint descpriptors. This applies to each context when endpoint
address can be used:
- when accessing endpoint files in FunctionFS filesystemi (in file name),
- in setup requests directed to specific endpoint (in wIndex field),
- in descriptors returned by FUNCTIONFS_ENDPOINT_DESC ioctl.

In endpoint file names the endpoint address number is formatted as
double-digit hexadecimal value ("ep%02x") which has few advantages -
it is easy to parse, allows to easly recognize endpoint direction basing
on its name (IN endpoint number starts with digit 8, and OUT with 0)
which can be useful for debugging purpose, and it makes easier to introduce
further features allowing to use each endpoint number in both directions
to have more endpoints available for function if hardware supports this
(for example we could have ep01 which is endpoint 1 with OUT direction,
and ep81 which is endpoint 1 with IN direction).

Physical endpoint address can be still obtained using ioctl named
FUNCTIONFS_ENDPOINT_REVMAP, but now it's not neccesary to handle
USB transactions properly.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-09-16 09:58:21 -05:00
..
f_acm.c usb: gadget: serial: replace {V,}DBG macro with dev_{v,}dbg 2014-08-27 14:13:17 -05:00
f_ecm.c
f_eem.c
f_fs.c usb: gadget: f_fs: virtual endpoint address mapping 2014-09-16 09:58:21 -05:00
f_hid.c
f_loopback.c usb: gadget: zero: Add support for interrupt EP 2014-08-27 14:13:18 -05:00
f_mass_storage.c usb: gadget: f_mass_storage: simplify start_transfer slightly 2014-09-02 09:16:47 -05:00
f_mass_storage.h
f_midi.c
f_ncm.c
f_obex.c usb: gadget: serial: replace {V,}DBG macro with dev_{v,}dbg 2014-08-27 14:13:17 -05:00
f_phonet.c
f_rndis.c
f_serial.c usb: gadget: serial: replace {V,}DBG macro with dev_{v,}dbg 2014-08-27 14:13:17 -05:00
f_sourcesink.c usb: gadget: zero: Fix warning generated by kbuild 2014-09-09 09:46:58 -05:00
f_subset.c
f_uac1.c usb: gadget: f_uac1: add configfs support 2014-08-20 14:05:21 -05:00
f_uac2.c usb: gadget: f_uac2: send reasonably sized packets 2014-09-02 09:28:00 -05:00
f_uvc.c usb: gadget: f_uvc: use usb_gstrings_attach 2014-09-09 09:49:44 -05:00
f_uvc.h usb: gadget: f_uvc: remove compatibility layer 2014-09-09 09:49:41 -05:00
g_zero.h usb: gadget: zero: Add support for interrupt EP 2014-08-27 14:13:18 -05:00
Makefile usb: gadget: f_uvc: convert f_uvc to new function interface 2014-09-09 09:49:16 -05:00
ndis.h
rndis.c
rndis.h
storage_common.c
storage_common.h
u_ecm.h
u_eem.h
u_ether_configfs.h
u_ether.c
u_ether.h
u_fs.h usb: gadget: f_fs: virtual endpoint address mapping 2014-09-16 09:58:21 -05:00
u_gether.h
u_ncm.h
u_phonet.h
u_rndis.h
u_serial.c usb: gadget: serial: remove PREFIX macro 2014-08-27 14:13:18 -05:00
u_serial.h
u_uac1.c usb: gadget: f_uac1: remove compatibility layer 2014-08-20 14:05:05 -05:00
u_uac1.h usb: gadget: f_uac1: add configfs support 2014-08-20 14:05:21 -05:00
u_uac2.h usb: gadget: f_uac2: add configfs support 2014-08-20 14:04:42 -05:00
u_uvc.h usb: gadget: f_uvc: convert f_uvc to new function interface 2014-09-09 09:49:16 -05:00
uvc_queue.c usb: gadget: uvc: separately compile some components of f_uvc 2014-09-09 09:49:12 -05:00
uvc_queue.h usb: gadget: uvc: separately compile some components of f_uvc 2014-09-09 09:49:12 -05:00
uvc_v4l2.c usb: gadget: uvc: separately compile some components of f_uvc 2014-09-09 09:49:12 -05:00
uvc_v4l2.h usb: gadget: uvc: separately compile some components of f_uvc 2014-09-09 09:49:12 -05:00
uvc_video.c usb: gadget: uvc: separately compile some components of f_uvc 2014-09-09 09:49:12 -05:00
uvc_video.h usb: gadget: uvc: separately compile some components of f_uvc 2014-09-09 09:49:12 -05:00
uvc.h usb: gadget: uvc: separately compile some components of f_uvc 2014-09-09 09:49:12 -05:00