aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/composite.h3
-rw-r--r--include/linux/usb/gadget.h9
-rw-r--r--include/linux/usb/renesas_usbhs.h2
3 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index 3d87defcc527..2511469a9904 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -148,6 +148,7 @@ struct usb_os_desc_table {
148 * @disable: (REQUIRED) Indicates the function should be disabled. Reasons 148 * @disable: (REQUIRED) Indicates the function should be disabled. Reasons
149 * include host resetting or reconfiguring the gadget, and disconnection. 149 * include host resetting or reconfiguring the gadget, and disconnection.
150 * @setup: Used for interface-specific control requests. 150 * @setup: Used for interface-specific control requests.
151 * @req_match: Tests if a given class request can be handled by this function.
151 * @suspend: Notifies functions when the host stops sending USB traffic. 152 * @suspend: Notifies functions when the host stops sending USB traffic.
152 * @resume: Notifies functions when the host restarts USB traffic. 153 * @resume: Notifies functions when the host restarts USB traffic.
153 * @get_status: Returns function status as a reply to 154 * @get_status: Returns function status as a reply to
@@ -213,6 +214,8 @@ struct usb_function {
213 void (*disable)(struct usb_function *); 214 void (*disable)(struct usb_function *);
214 int (*setup)(struct usb_function *, 215 int (*setup)(struct usb_function *,
215 const struct usb_ctrlrequest *); 216 const struct usb_ctrlrequest *);
217 bool (*req_match)(struct usb_function *,
218 const struct usb_ctrlrequest *);
216 void (*suspend)(struct usb_function *); 219 void (*suspend)(struct usb_function *);
217 void (*resume)(struct usb_function *); 220 void (*resume)(struct usb_function *);
218 221
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
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h
index 9fd9e481ea98..f06529c14141 100644
--- a/include/linux/usb/renesas_usbhs.h
+++ b/include/linux/usb/renesas_usbhs.h
@@ -165,6 +165,8 @@ struct renesas_usbhs_driver_param {
165 */ 165 */
166 u32 has_otg:1; /* for controlling PWEN/EXTLP */ 166 u32 has_otg:1; /* for controlling PWEN/EXTLP */
167 u32 has_sudmac:1; /* for SUDMAC */ 167 u32 has_sudmac:1; /* for SUDMAC */
168 u32 has_usb_dmac:1; /* for USB-DMAC */
169#define USBHS_USB_DMAC_XFER_SIZE 32 /* hardcode the xfer size */
168}; 170};
169 171
170#define USBHS_TYPE_R8A7790 1 172#define USBHS_TYPE_R8A7790 1