usb: patches for v4.4 merge window
This pull request is large with a total of 136 non-merge commits. Because of its size, we will only describe the big things in broad terms. Many will be happy to know that dwc3 is now almost twice as fast after some profiling and speed improvements. Also in dwc3, John Youn from Synopsys added support for their new DWC USB3.1 IP Core and the HAPS platform which can be used to validate it. A series of patches from Robert Baldyga cleaned up uses of ep->driver_data as a flag for "claimed endpoint" in favor of the new ep->claimed flag. Sudip Mukherjee fixed a ton of really old problems on the amd5536udc driver. That should make a few people happy. Heikki Krogerus worked on converting dwc3 to the unified device property interface. Together with these, there's a ton of non-critical fixes, typos and stuff like that. Signed-off-by: Felipe Balbi <balbi@ti.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJWJoq5AAoJEIaOsuA1yqREOlkQAJTndRGxhcZR5rLzjyRDDags pYoXJAqaneq5G8BwKY+2AQlPaUr87UEHUOo8pk4S31mdFHlp/d/6YIXLpdlYbEcW ixGhtxZnUhyvWM0HYGgyoDGQP9YJXy5/MR2lEJhmsqcH/Q0dih5VrDGyJ3BxEboZ 2jXy7iou5fs5nHsR4fpdUH+ER//oKgHopRbbt+mmCwZbRJbuukA0KVDMHO8ix6cy tG/8zbnv5RY3O4a0lJAST8LNmtpxfF9yUCs83b6muhLgO9GXUGYb+I8DjPJMbwag klOy8Z1bG5e4ymh6383ZG7wDITf82N5cy5huoyunQHVjYg1L8vDHa9aF72e+yR/3 blb9OYALbKPV072HMwOfH+M9cvcCVDGytbJQIgMot9mjpP6GPhgbGtxb+RWNy2j8 Z2kEaxd3BUXvWiRbvyvn7uQuT/cAF4StrTnQrsbFSt0fKAUkQnGdK7XxYfGGql97 p3u2x2D7YSkurywMWyXjuBsm/mXsImAfTJvoWndyOIHU2PNAzIDM4k9TWaYNNAKA ilZSuSC/JVnMPEH/J/QpytxMM5wbiGyJOyI4bc4MiAXgCkG3qm8vi0PMZM8x0rEu q778B+50alg9U7/G75dt0WQP+kqDjn+iUB7i/YUC9sq/Dhlmpp48KvJU+zaco+7I QsxGXmlgeA7yXX8ywy71 =jPoY -----END PGP SIGNATURE----- Merge tag 'usb-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v4.4 merge window This pull request is large with a total of 136 non-merge commits. Because of its size, we will only describe the big things in broad terms. Many will be happy to know that dwc3 is now almost twice as fast after some profiling and speed improvements. Also in dwc3, John Youn from Synopsys added support for their new DWC USB3.1 IP Core and the HAPS platform which can be used to validate it. A series of patches from Robert Baldyga cleaned up uses of ep->driver_data as a flag for "claimed endpoint" in favor of the new ep->claimed flag. Sudip Mukherjee fixed a ton of really old problems on the amd5536udc driver. That should make a few people happy. Heikki Krogerus worked on converting dwc3 to the unified device property interface. Together with these, there's a ton of non-critical fixes, typos and stuff like that. Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
commit
a4d8e93c31
74 changed files with 2758 additions and 2266 deletions
|
@ -32,9 +32,9 @@
|
|||
#ifndef __LINUX_USB_CH9_H
|
||||
#define __LINUX_USB_CH9_H
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <uapi/linux/usb/ch9.h>
|
||||
|
||||
|
||||
/**
|
||||
* usb_speed_string() - Returns human readable-name of the speed.
|
||||
* @speed: The speed to return human-readable name for. If it's not
|
||||
|
@ -43,6 +43,15 @@
|
|||
*/
|
||||
extern const char *usb_speed_string(enum usb_device_speed speed);
|
||||
|
||||
/**
|
||||
* usb_get_maximum_speed - Get maximum requested speed for a given USB
|
||||
* controller.
|
||||
* @dev: Pointer to the given USB controller device
|
||||
*
|
||||
* The function gets the maximum speed string from property "maximum-speed",
|
||||
* and returns the corresponding enum usb_device_speed.
|
||||
*/
|
||||
extern enum usb_device_speed usb_get_maximum_speed(struct device *dev);
|
||||
|
||||
/**
|
||||
* usb_state_string - Returns human readable name for the state.
|
||||
|
|
|
@ -215,6 +215,7 @@ struct usb_ep {
|
|||
struct list_head ep_list;
|
||||
struct usb_ep_caps caps;
|
||||
bool claimed;
|
||||
bool enabled;
|
||||
unsigned maxpacket:16;
|
||||
unsigned maxpacket_limit:16;
|
||||
unsigned max_streams:16;
|
||||
|
@ -264,7 +265,18 @@ static inline void usb_ep_set_maxpacket_limit(struct usb_ep *ep,
|
|||
*/
|
||||
static inline int usb_ep_enable(struct usb_ep *ep)
|
||||
{
|
||||
return ep->ops->enable(ep, ep->desc);
|
||||
int ret;
|
||||
|
||||
if (ep->enabled)
|
||||
return 0;
|
||||
|
||||
ret = ep->ops->enable(ep, ep->desc);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ep->enabled = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -281,7 +293,18 @@ static inline int usb_ep_enable(struct usb_ep *ep)
|
|||
*/
|
||||
static inline int usb_ep_disable(struct usb_ep *ep)
|
||||
{
|
||||
return ep->ops->disable(ep);
|
||||
int ret;
|
||||
|
||||
if (!ep->enabled)
|
||||
return 0;
|
||||
|
||||
ret = ep->ops->disable(ep);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ep->enabled = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1233,6 +1256,8 @@ extern struct usb_ep *usb_ep_autoconfig_ss(struct usb_gadget *,
|
|||
struct usb_endpoint_descriptor *,
|
||||
struct usb_ss_ep_comp_descriptor *);
|
||||
|
||||
extern void usb_ep_autoconfig_release(struct usb_ep *);
|
||||
|
||||
extern void usb_ep_autoconfig_reset(struct usb_gadget *);
|
||||
|
||||
#endif /* __LINUX_USB_GADGET_H */
|
||||
|
|
|
@ -95,7 +95,7 @@ struct musb_hdrc_config {
|
|||
/* musb CLKIN in Blackfin in MHZ */
|
||||
unsigned char clkin;
|
||||
#endif
|
||||
|
||||
u32 maximum_speed;
|
||||
};
|
||||
|
||||
struct musb_hdrc_platform_data {
|
||||
|
|
|
@ -12,22 +12,10 @@
|
|||
#include <linux/usb/phy.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_OF)
|
||||
enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np);
|
||||
enum usb_device_speed of_usb_get_maximum_speed(struct device_node *np);
|
||||
bool of_usb_host_tpl_support(struct device_node *np);
|
||||
int of_usb_update_otg_caps(struct device_node *np,
|
||||
struct usb_otg_caps *otg_caps);
|
||||
#else
|
||||
static inline enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np)
|
||||
{
|
||||
return USB_DR_MODE_UNKNOWN;
|
||||
}
|
||||
|
||||
static inline enum usb_device_speed
|
||||
of_usb_get_maximum_speed(struct device_node *np)
|
||||
{
|
||||
return USB_SPEED_UNKNOWN;
|
||||
}
|
||||
static inline bool of_usb_host_tpl_support(struct device_node *np)
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -119,4 +119,13 @@ enum usb_dr_mode {
|
|||
USB_DR_MODE_OTG,
|
||||
};
|
||||
|
||||
/**
|
||||
* usb_get_dr_mode - Get dual role mode for given device
|
||||
* @dev: Pointer to the given device
|
||||
*
|
||||
* The function gets phy interface string from property 'dr_mode',
|
||||
* and returns the correspondig enum usb_dr_mode
|
||||
*/
|
||||
extern enum usb_dr_mode usb_get_dr_mode(struct device *dev);
|
||||
|
||||
#endif /* __LINUX_USB_OTG_H */
|
||||
|
|
|
@ -63,7 +63,7 @@ enum usb_otg_state {
|
|||
struct usb_phy;
|
||||
struct usb_otg;
|
||||
|
||||
/* for transceivers connected thru an ULPI interface, the user must
|
||||
/* for phys connected thru an ULPI interface, the user must
|
||||
* provide access ops
|
||||
*/
|
||||
struct usb_phy_io_ops {
|
||||
|
@ -92,10 +92,10 @@ struct usb_phy {
|
|||
u16 port_status;
|
||||
u16 port_change;
|
||||
|
||||
/* to support controllers that have multiple transceivers */
|
||||
/* to support controllers that have multiple phys */
|
||||
struct list_head head;
|
||||
|
||||
/* initialize/shutdown the OTG controller */
|
||||
/* initialize/shutdown the phy */
|
||||
int (*init)(struct usb_phy *x);
|
||||
void (*shutdown)(struct usb_phy *x);
|
||||
|
||||
|
@ -106,7 +106,7 @@ struct usb_phy {
|
|||
int (*set_power)(struct usb_phy *x,
|
||||
unsigned mA);
|
||||
|
||||
/* Set transceiver into suspend mode */
|
||||
/* Set phy into suspend mode */
|
||||
int (*set_suspend)(struct usb_phy *x,
|
||||
int suspend);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue