summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/g_zero.h
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2013-11-07 11:41:28 +0400
committerFelipe Balbi <balbi@ti.com>2013-11-26 23:47:41 +0400
commit25d8015177ae7baedb8bdc76dffc0884b0d785a3 (patch)
tree9fd9fa78b3d8545e9073f2b68cb11862bfd9162b /drivers/usb/gadget/g_zero.h
parentc0501f47c68997ea2933460b9908e6a049c59f21 (diff)
downloadlinux-25d8015177ae7baedb8bdc76dffc0884b0d785a3.tar.xz
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.h11
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 {