Merge tag 'usb-for-v3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Feb 2015 19:03:20 +0000 (11:03 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Feb 2015 19:03:20 +0000 (11:03 -0800)
Felipe writes:

usb: patches for v3.20 merge window

Here's the big pull request for Gadgets and PHYs. It's
a total of 217 non-merge commits with pretty much everything
being touched.

The most important bits are a ton of new documentation for
almost all usb gadget functions, a new isp1760 UDC driver,
several improvements to the old net2280 UDC driver, and
some minor tracepoint improvements to dwc3.

Other than that, a big list of minor cleanups, smaller bugfixes
and new features all over the place.

Signed-off-by: Felipe Balbi <balbi@ti.com>
1  2 
MAINTAINERS
drivers/usb/host/Kconfig
drivers/usb/isp1760/isp1760-hcd.c

diff --cc MAINTAINERS
Simple merge
Simple merge
@@@ -2211,59 -2189,46 +2187,49 @@@ void isp1760_deinit_kmem_cache(void
        kmem_cache_destroy(urb_listitem_cachep);
  }
  
- struct usb_hcd *isp1760_register(phys_addr_t res_start, resource_size_t res_len,
-                                int irq, unsigned long irqflags,
-                                int rst_gpio,
-                                struct device *dev, const char *busname,
-                                unsigned int devflags)
+ int isp1760_hcd_register(struct isp1760_hcd *priv, void __iomem *regs,
+                        struct resource *mem, int irq, unsigned long irqflags,
+                        struct device *dev)
  {
        struct usb_hcd *hcd;
-       struct isp1760_hcd *priv;
        int ret;
  
-       if (usb_disabled())
-               return ERR_PTR(-ENODEV);
-       /* prevent usb-core allocating DMA pages */
-       dev->dma_mask = NULL;
        hcd = usb_create_hcd(&isp1760_hc_driver, dev, dev_name(dev));
        if (!hcd)
-               return ERR_PTR(-ENOMEM);
+               return -ENOMEM;
+       *(struct isp1760_hcd **)hcd->hcd_priv = priv;
+       priv->hcd = hcd;
  
-       priv = hcd_to_priv(hcd);
-       priv->devflags = devflags;
-       priv->rst_gpio = rst_gpio;
        init_memory(priv);
-       hcd->regs = ioremap(res_start, res_len);
-       if (!hcd->regs) {
-               ret = -EIO;
-               goto err_put;
-       }
  
        hcd->irq = irq;
-       hcd->rsrc_start = res_start;
-       hcd->rsrc_len = res_len;
+       hcd->regs = regs;
+       hcd->rsrc_start = mem->start;
+       hcd->rsrc_len = resource_size(mem);
  
 +      /* This driver doesn't support wakeup requests */
 +      hcd->cant_recv_wakeups = 1;
 +
        ret = usb_add_hcd(hcd, irq, irqflags);
        if (ret)
-               goto err_unmap;
+               goto error;
        device_wakeup_enable(hcd->self.controller);
  
-       return hcd;
+       return 0;
  
- err_unmap:
-        iounmap(hcd->regs);
+ error:
+       usb_put_hcd(hcd);
+       return ret;
+ }
  
- err_put:
-        usb_put_hcd(hcd);
+ void isp1760_hcd_unregister(struct isp1760_hcd *priv)
+ {
+       if (!priv->hcd)
+               return;
  
-        return ERR_PTR(ret);
+       usb_remove_hcd(priv->hcd);
+       usb_put_hcd(priv->hcd);
  }
- MODULE_DESCRIPTION("Driver for the ISP1760 USB-controller from NXP");
- MODULE_AUTHOR("Sebastian Siewior <bigeasy@linuxtronix.de>");
- MODULE_LICENSE("GPL v2");