[RFCv3 1/3] usb: gadget: ep: add feature flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a few flags to tell gadget framework which
features a particular endpoint supports.

Signed-off-by: Felipe Balbi <balbi@xxxxxx>
---
 include/linux/usb/gadget.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 942ef5e..cf1d027 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -159,6 +159,12 @@ struct usb_ep_ops {
  *	enabled and remains valid until the endpoint is disabled.
  * @comp_desc: In case of SuperSpeed support, this is the endpoint companion
  *	descriptor that is used to configure the endpoint
+ * @has_bulk: endpoint supports bulk transfers
+ * @has_control: endpoint supports control transfers
+ * @has_interrupt: endpoint supports interrupt transfers
+ * @has_isochronous: endpoint supports isochronous transfers
+ * @has_dir_in: endpoint supports IN direction
+ * @has_dir_out: endpoint supports OUT direction
  *
  * the bus controller driver lists all the general purpose endpoints in
  * gadget->ep_list.  the control endpoint (gadget->ep0) is not in that list,
@@ -177,6 +183,13 @@ struct usb_ep {
 	u8			address;
 	const struct usb_endpoint_descriptor	*desc;
 	const struct usb_ss_ep_comp_descriptor	*comp_desc;
+
+	unsigned		has_bulk:1;
+	unsigned		has_control:1;
+	unsigned		has_interrupt:1;
+	unsigned		has_isochronous:1;
+	unsigned		has_dir_in:1;
+	unsigned		has_dir_out:1;
 };
 
 /*-------------------------------------------------------------------------*/
-- 
1.8.4.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux