aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2014-09-09 08:23:16 +0200
committerMister Oyster <oysterized@gmail.com>2017-09-14 17:05:22 +0200
commit17882e4f29339cc4e67bb13ec425ffff1a9d7354 (patch)
treee2c5e17ad2096254c0ef0e0eb42e78ada1db443a /include
parentd658e01cac98cfbc1e0edba4e8e564ba668a6e2f (diff)
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> Signed-off-by: Jerry Zhang <zhangjerry@google.com> Change-Id: I55987bf0c6744327f7763b567b5a2b39c50d18e6
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 0f8f7be5b..8a17a23d0 100644
--- a/include/uapi/linux/usb/functionfs.h
+++ b/include/uapi/linux/usb/functionfs.h
@@ -169,6 +169,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__ */