aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/gadget.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb/gadget.h')
-rw-r--r--include/linux/usb/gadget.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index e2f00fd8cd47..4f3dfb7d0654 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -190,7 +190,7 @@ struct usb_ep {
190 * @ep:the endpoint being configured 190 * @ep:the endpoint being configured
191 * @maxpacket_limit:value of maximum packet size limit 191 * @maxpacket_limit:value of maximum packet size limit
192 * 192 *
193 * This function shoud be used only in UDC drivers to initialize endpoint 193 * This function should be used only in UDC drivers to initialize endpoint
194 * (usually in probe function). 194 * (usually in probe function).
195 */ 195 */
196static inline void usb_ep_set_maxpacket_limit(struct usb_ep *ep, 196static inline void usb_ep_set_maxpacket_limit(struct usb_ep *ep,
@@ -474,6 +474,7 @@ struct usb_dcd_config_params {
474 474
475struct usb_gadget; 475struct usb_gadget;
476struct usb_gadget_driver; 476struct usb_gadget_driver;
477struct usb_udc;
477 478
478/* the rest of the api to the controller hardware: device operations, 479/* the rest of the api to the controller hardware: device operations,
479 * which don't involve endpoints (or i/o). 480 * which don't involve endpoints (or i/o).
@@ -496,6 +497,7 @@ struct usb_gadget_ops {
496/** 497/**
497 * struct usb_gadget - represents a usb slave device 498 * struct usb_gadget - represents a usb slave device
498 * @work: (internal use) Workqueue to be used for sysfs_notify() 499 * @work: (internal use) Workqueue to be used for sysfs_notify()
500 * @udc: struct usb_udc pointer for this gadget
499 * @ops: Function pointers used to access hardware-specific operations. 501 * @ops: Function pointers used to access hardware-specific operations.
500 * @ep0: Endpoint zero, used when reading or writing responses to 502 * @ep0: Endpoint zero, used when reading or writing responses to
501 * driver setup() requests 503 * driver setup() requests
@@ -545,6 +547,7 @@ struct usb_gadget_ops {
545 */ 547 */
546struct usb_gadget { 548struct usb_gadget {
547 struct work_struct work; 549 struct work_struct work;
550 struct usb_udc *udc;
548 /* readonly to gadget driver */ 551 /* readonly to gadget driver */
549 const struct usb_gadget_ops *ops; 552 const struct usb_gadget_ops *ops;
550 struct usb_ep *ep0; 553 struct usb_ep *ep0;
@@ -1029,6 +1032,10 @@ extern void usb_gadget_udc_reset(struct usb_gadget *gadget,
1029extern void usb_gadget_giveback_request(struct usb_ep *ep, 1032extern void usb_gadget_giveback_request(struct usb_ep *ep,
1030 struct usb_request *req); 1033 struct usb_request *req);
1031 1034
1035/*-------------------------------------------------------------------------*/
1036
1037/* utility to update vbus status for udc core, it may be scheduled */
1038extern void usb_udc_vbus_handler(struct usb_gadget *gadget, bool status);
1032 1039
1033/*-------------------------------------------------------------------------*/ 1040/*-------------------------------------------------------------------------*/
1034 1041