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.
This commit is contained in:
Greg Kroah-Hartman
2015-12-26 16:56:25 -08:00
83 changed files with 4266 additions and 1264 deletions

View File

@@ -402,6 +402,9 @@ static inline void usb_ep_free_request(struct usb_ep *ep,
static inline int usb_ep_queue(struct usb_ep *ep,
struct usb_request *req, gfp_t gfp_flags)
{
if (WARN_ON_ONCE(!ep->enabled && ep->address))
return -ESHUTDOWN;
return ep->ops->queue(ep, req, gfp_flags);
}
@@ -1012,6 +1015,9 @@ static inline int usb_gadget_activate(struct usb_gadget *gadget)
* @reset: Invoked on USB bus reset. It is mandatory for all gadget drivers
* and should be called in_interrupt.
* @driver: Driver model state for this driver.
* @udc_name: A name of UDC this driver should be bound to. If udc_name is NULL,
* this driver will be bound to any available UDC.
* @pending: UDC core private data used for deferred probe of this driver.
*
* Devices are disabled till a gadget driver successfully bind()s, which
* means the driver will handle setup() requests needed to enumerate (and
@@ -1072,6 +1078,9 @@ struct usb_gadget_driver {
/* FIXME support safe rmmod */
struct device_driver driver;
char *udc_name;
struct list_head pending;
};
@@ -1117,8 +1126,6 @@ extern int usb_add_gadget_udc_release(struct device *parent,
struct usb_gadget *gadget, void (*release)(struct device *dev));
extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget);
extern void usb_del_gadget_udc(struct usb_gadget *gadget);
extern int usb_udc_attach_driver(const char *name,
struct usb_gadget_driver *driver);
/*-------------------------------------------------------------------------*/

View File

@@ -1,30 +0,0 @@
/*
* Copyright (C) 2011-2012 by Texas Instruments
*
* The Inventra Controller Driver for Linux is free software; you
* can redistribute it and/or modify it under the terms of the GNU
* General Public License version 2 as published by the Free Software
* Foundation.
*/
#ifndef __MUSB_OMAP_H__
#define __MUSB_OMAP_H__
enum omap_musb_vbus_id_status {
OMAP_MUSB_UNKNOWN = 0,
OMAP_MUSB_ID_GROUND,
OMAP_MUSB_ID_FLOAT,
OMAP_MUSB_VBUS_VALID,
OMAP_MUSB_VBUS_OFF,
};
#if (defined(CONFIG_USB_MUSB_OMAP2PLUS) || \
defined(CONFIG_USB_MUSB_OMAP2PLUS_MODULE))
void omap_musb_mailbox(enum omap_musb_vbus_id_status status);
#else
static inline void omap_musb_mailbox(enum omap_musb_vbus_id_status status)
{
}
#endif
#endif /* __MUSB_OMAP_H__ */

View File

@@ -133,6 +133,21 @@ struct musb_hdrc_platform_data {
const void *platform_ops;
};
enum musb_vbus_id_status {
MUSB_UNKNOWN = 0,
MUSB_ID_GROUND,
MUSB_ID_FLOAT,
MUSB_VBUS_VALID,
MUSB_VBUS_OFF,
};
#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
void musb_mailbox(enum musb_vbus_id_status status);
#else
static inline void musb_mailbox(enum musb_vbus_id_status status)
{
}
#endif
/* TUSB 6010 support */

View File

@@ -12,10 +12,16 @@
#include <linux/usb/phy.h>
#if IS_ENABLED(CONFIG_OF)
enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_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_by_phy(struct device_node *phy_np)
{
return USB_DR_MODE_UNKNOWN;
}
static inline bool of_usb_host_tpl_support(struct device_node *np)
{
return false;

View File

@@ -105,12 +105,26 @@ struct renesas_usbhs_platform_callback {
* some register needs USB chip specific parameters.
* This struct show it to driver
*/
struct renesas_usbhs_driver_pipe_config {
u8 type; /* USB_ENDPOINT_XFER_xxx */
u16 bufsize;
u8 bufnum;
bool double_buf;
};
#define RENESAS_USBHS_PIPE(_type, _size, _num, _double_buf) { \
.type = (_type), \
.bufsize = (_size), \
.bufnum = (_num), \
.double_buf = (_double_buf), \
}
struct renesas_usbhs_driver_param {
/*
* pipe settings
*/
u32 *pipe_type; /* array of USB_ENDPOINT_XFER_xxx (from ep0) */
int pipe_size; /* pipe_type array size */
struct renesas_usbhs_driver_pipe_config *pipe_configs;
int pipe_size; /* pipe_configs array size */
/*
* option: