From 17882e4f29339cc4e67bb13ec425ffff1a9d7354 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Tue, 9 Sep 2014 08:23:16 +0200 Subject: 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 Acked-by: Michal Nazarewicz Signed-off-by: Felipe Balbi Signed-off-by: Jerry Zhang Change-Id: I55987bf0c6744327f7763b567b5a2b39c50d18e6 --- include/uapi/linux/usb/functionfs.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/uapi/linux/usb/functionfs.h') 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__ */ -- cgit v1.2.3