diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2013-11-07 08:41:27 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-11-26 13:46:13 -0600 |
commit | c0501f47c68997ea2933460b9908e6a049c59f21 (patch) | |
tree | 70dad9d7a3b1d8cecace3ebdc4dbdbd0bdca9f7c /drivers/usb/gadget/g_zero.h | |
parent | 1efd54eab2b60c68c2ce75ea635306cef847d751 (diff) | |
download | op-kernel-dev-c0501f47c68997ea2933460b9908e6a049c59f21.zip op-kernel-dev-c0501f47c68997ea2933460b9908e6a049c59f21.tar.gz |
usb: gadget: f_loopback: add configfs support
Add support for using the loopback USB 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 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/gadget/g_zero.h b/drivers/usb/gadget/g_zero.h index a1c1a97..19ec50a42 100644 --- a/drivers/usb/gadget/g_zero.h +++ b/drivers/usb/gadget/g_zero.h @@ -6,6 +6,9 @@ #ifndef __G_ZERO_H #define __G_ZERO_H +#define GZERO_BULK_BUFLEN 4096 +#define GZERO_QLEN 32 + struct usb_zero_options { unsigned pattern; unsigned isoc_interval; @@ -30,6 +33,15 @@ struct f_lb_opts { struct usb_function_instance func_inst; unsigned bulk_buflen; unsigned qlen; + + /* + * 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; }; void lb_modexit(void); |