diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2013-11-07 08:41:28 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-11-26 13:47:41 -0600 |
commit | 25d8015177ae7baedb8bdc76dffc0884b0d785a3 (patch) | |
tree | 9fd9fa78b3d8545e9073f2b68cb11862bfd9162b /drivers/usb/gadget/g_zero.h | |
parent | c0501f47c68997ea2933460b9908e6a049c59f21 (diff) |
usb: gadget: f_sourcesink: add configfs support
Add support for using the sourcesink function in gadgets composed with
configfs.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/g_zero.h')
-rw-r--r-- | drivers/usb/gadget/g_zero.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/gadget/g_zero.h b/drivers/usb/gadget/g_zero.h index 19ec50a42a74..15f180904f8a 100644 --- a/drivers/usb/gadget/g_zero.h +++ b/drivers/usb/gadget/g_zero.h @@ -8,6 +8,8 @@ #define GZERO_BULK_BUFLEN 4096 #define GZERO_QLEN 32 +#define GZERO_ISOC_INTERVAL 4 +#define GZERO_ISOC_MAXPACKET 1024 struct usb_zero_options { unsigned pattern; @@ -27,6 +29,15 @@ struct f_ss_opts { unsigned isoc_mult; unsigned isoc_maxburst; unsigned bulk_buflen; + + /* + * Read/write access to configfs attributes is handled by configfs. + * + * This is to protect the data from concurrent access by read/write + * and create symlink/remove symlink. + */ + struct mutex lock; + int refcnt; }; struct f_lb_opts { |