summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2014-09-09 08:23:16 +0200
committerFelipe Balbi <balbi@ti.com>2014-09-09 10:04:45 -0500
commitc559a353410939c0884e83bdb0e2420a986ac53b (patch)
treea08371689dd43528a869f443839df674a344a58c /include
parente45cfa2051d1b7d3378887d9576e11484e25c7d6 (diff)
downloadlinux-c559a353410939c0884e83bdb0e2420a986ac53b.tar.gz
linux-c559a353410939c0884e83bdb0e2420a986ac53b.tar.bz2
linux-c559a353410939c0884e83bdb0e2420a986ac53b.zip
usb: gadget: f_fs: add ioctl returning ep descriptor
This patch introduces ioctl named FUNCTIONFS_ENDPOINT_DESC, which returns endpoint descriptor to userspace. It works only if function is active. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/usb/functionfs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h
index 6d2a16b834bf..7c7a2feb0e6e 100644
--- a/include/uapi/linux/usb/functionfs.h
+++ b/include/uapi/linux/usb/functionfs.h
@@ -275,6 +275,12 @@ struct usb_functionfs_event {
*/
#define FUNCTIONFS_ENDPOINT_REVMAP _IO('g', 129)
+/*
+ * Returns endpoint descriptor. If function is not active returns -ENODEV.
+ */
+#define FUNCTIONFS_ENDPOINT_DESC _IOR('g', 130, \
+ struct usb_endpoint_descriptor)
+
#endif /* _UAPI__LINUX_FUNCTIONFS_H__ */