aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-26 19:56:25 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-26 19:56:25 -0500
commit87cf5586fdc91ea3b27739372af430b35b9c99db (patch)
treeb83f696e996aff2c1203fd59cbe43b522c0623f2 /include/linux/usb
parentbfccd95e7aba73d0d3154912b17b855cb9938c50 (diff)
parent5072cfc40a80cea3749fd3413b3896630d8c787e (diff)
Merge tag 'usb-for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes: usb: patches for v4.5 A ton of improvements to dwc2 have been made. The driver should be a lot more stable on v4.5 then ever before. Our good old dwc3 got a few cleanups and misc fixes and also added support to Xilinx's integration of this IP. Yoshihiro Shimoda gives us support for a new USB3 peripheral controller from Renesas. Other than these, the usual misc fixes all over the place.
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/gadget.h11
-rw-r--r--include/linux/usb/musb-omap.h30
-rw-r--r--include/linux/usb/musb.h15
-rw-r--r--include/linux/usb/of.h6
-rw-r--r--include/linux/usb/renesas_usbhs.h18
5 files changed, 46 insertions, 34 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 3d583a10b926..d82d0068872b 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -402,6 +402,9 @@ static inline void usb_ep_free_request(struct usb_ep *ep,
402static inline int usb_ep_queue(struct usb_ep *ep, 402static inline int usb_ep_queue(struct usb_ep *ep,
403 struct usb_request *req, gfp_t gfp_flags) 403 struct usb_request *req, gfp_t gfp_flags)
404{ 404{
405 if (WARN_ON_ONCE(!ep->enabled && ep->address))
406 return -ESHUTDOWN;
407
405 return ep->ops->queue(ep, req, gfp_flags); 408 return ep->ops->queue(ep, req, gfp_flags);
406} 409}
407 410
@@ -1012,6 +1015,9 @@ static inline int usb_gadget_activate(struct usb_gadget *gadget)
1012 * @reset: Invoked on USB bus reset. It is mandatory for all gadget drivers 1015 * @reset: Invoked on USB bus reset. It is mandatory for all gadget drivers
1013 * and should be called in_interrupt. 1016 * and should be called in_interrupt.
1014 * @driver: Driver model state for this driver. 1017 * @driver: Driver model state for this driver.
1018 * @udc_name: A name of UDC this driver should be bound to. If udc_name is NULL,
1019 * this driver will be bound to any available UDC.
1020 * @pending: UDC core private data used for deferred probe of this driver.
1015 * 1021 *
1016 * Devices are disabled till a gadget driver successfully bind()s, which 1022 * Devices are disabled till a gadget driver successfully bind()s, which
1017 * means the driver will handle setup() requests needed to enumerate (and 1023 * means the driver will handle setup() requests needed to enumerate (and
@@ -1072,6 +1078,9 @@ struct usb_gadget_driver {
1072 1078
1073 /* FIXME support safe rmmod */ 1079 /* FIXME support safe rmmod */
1074 struct device_driver driver; 1080 struct device_driver driver;
1081
1082 char *udc_name;
1083 struct list_head pending;
1075}; 1084};
1076 1085
1077 1086
@@ -1117,8 +1126,6 @@ extern int usb_add_gadget_udc_release(struct device *parent,
1117 struct usb_gadget *gadget, void (*release)(struct device *dev)); 1126 struct usb_gadget *gadget, void (*release)(struct device *dev));
1118extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget); 1127extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget);
1119extern void usb_del_gadget_udc(struct usb_gadget *gadget); 1128extern void usb_del_gadget_udc(struct usb_gadget *gadget);
1120extern int usb_udc_attach_driver(const char *name,
1121 struct usb_gadget_driver *driver);
1122 1129
1123/*-------------------------------------------------------------------------*/ 1130/*-------------------------------------------------------------------------*/
1124 1131
diff --git a/include/linux/usb/musb-omap.h b/include/linux/usb/musb-omap.h
deleted file mode 100644
index 7774c5986f07..000000000000
--- a/include/linux/usb/musb-omap.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2 * Copyright (C) 2011-2012 by Texas Instruments
3 *
4 * The Inventra Controller Driver for Linux is free software; you
5 * can redistribute it and/or modify it under the terms of the GNU
6 * General Public License version 2 as published by the Free Software
7 * Foundation.
8 */
9
10#ifndef __MUSB_OMAP_H__
11#define __MUSB_OMAP_H__
12
13enum omap_musb_vbus_id_status {
14 OMAP_MUSB_UNKNOWN = 0,
15 OMAP_MUSB_ID_GROUND,
16 OMAP_MUSB_ID_FLOAT,
17 OMAP_MUSB_VBUS_VALID,
18 OMAP_MUSB_VBUS_OFF,
19};
20
21#if (defined(CONFIG_USB_MUSB_OMAP2PLUS) || \
22 defined(CONFIG_USB_MUSB_OMAP2PLUS_MODULE))
23void omap_musb_mailbox(enum omap_musb_vbus_id_status status);
24#else
25static inline void omap_musb_mailbox(enum omap_musb_vbus_id_status status)
26{
27}
28#endif
29
30#endif /* __MUSB_OMAP_H__ */
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index fa6dc132bd1b..96ddfb7ab018 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -133,6 +133,21 @@ struct musb_hdrc_platform_data {
133 const void *platform_ops; 133 const void *platform_ops;
134}; 134};
135 135
136enum musb_vbus_id_status {
137 MUSB_UNKNOWN = 0,
138 MUSB_ID_GROUND,
139 MUSB_ID_FLOAT,
140 MUSB_VBUS_VALID,
141 MUSB_VBUS_OFF,
142};
143
144#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
145void musb_mailbox(enum musb_vbus_id_status status);
146#else
147static inline void musb_mailbox(enum musb_vbus_id_status status)
148{
149}
150#endif
136 151
137/* TUSB 6010 support */ 152/* TUSB 6010 support */
138 153
diff --git a/include/linux/usb/of.h b/include/linux/usb/of.h
index c3fe9e48ce27..974bce93aa28 100644
--- a/include/linux/usb/of.h
+++ b/include/linux/usb/of.h
@@ -12,10 +12,16 @@
12#include <linux/usb/phy.h> 12#include <linux/usb/phy.h>
13 13
14#if IS_ENABLED(CONFIG_OF) 14#if IS_ENABLED(CONFIG_OF)
15enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_np);
15bool of_usb_host_tpl_support(struct device_node *np); 16bool of_usb_host_tpl_support(struct device_node *np);
16int of_usb_update_otg_caps(struct device_node *np, 17int of_usb_update_otg_caps(struct device_node *np,
17 struct usb_otg_caps *otg_caps); 18 struct usb_otg_caps *otg_caps);
18#else 19#else
20static inline enum usb_dr_mode
21of_usb_get_dr_mode_by_phy(struct device_node *phy_np)
22{
23 return USB_DR_MODE_UNKNOWN;
24}
19static inline bool of_usb_host_tpl_support(struct device_node *np) 25static inline bool of_usb_host_tpl_support(struct device_node *np)
20{ 26{
21 return false; 27 return false;
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h
index bfb74723f151..4db191fe8c2c 100644
--- a/include/linux/usb/renesas_usbhs.h
+++ b/include/linux/usb/renesas_usbhs.h
@@ -105,12 +105,26 @@ struct renesas_usbhs_platform_callback {
105 * some register needs USB chip specific parameters. 105 * some register needs USB chip specific parameters.
106 * This struct show it to driver 106 * This struct show it to driver
107 */ 107 */
108
109struct renesas_usbhs_driver_pipe_config {
110 u8 type; /* USB_ENDPOINT_XFER_xxx */
111 u16 bufsize;
112 u8 bufnum;
113 bool double_buf;
114};
115#define RENESAS_USBHS_PIPE(_type, _size, _num, _double_buf) { \
116 .type = (_type), \
117 .bufsize = (_size), \
118 .bufnum = (_num), \
119 .double_buf = (_double_buf), \
120 }
121
108struct renesas_usbhs_driver_param { 122struct renesas_usbhs_driver_param {
109 /* 123 /*
110 * pipe settings 124 * pipe settings
111 */ 125 */
112 u32 *pipe_type; /* array of USB_ENDPOINT_XFER_xxx (from ep0) */ 126 struct renesas_usbhs_driver_pipe_config *pipe_configs;
113 int pipe_size; /* pipe_type array size */ 127 int pipe_size; /* pipe_configs array size */
114 128
115 /* 129 /*
116 * option: 130 * option: