Merge tag 'usb-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 22:18:00 +0000 (15:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 22:18:00 +0000 (15:18 -0700)
Felipe writes:

usb: patches for v3.10 merge window

Here is the big Gadget & PHY pull request. Many of us have
been really busy lately getting multiple drivers to a better
position.

Since this pull request is so large, I will divide it in sections
so it's easier to grasp what's included.

- cleanups:
. UDC drivers no longer touch gadget->dev, that's now udc-core
responsibility
. Many more UDC drivers converted to usb_gadget_map/unmap_request()
. UDC drivers no longer initialize DMA-related fields from gadget's
device structure
. UDC drivers don't touch gadget.dev.driver directly
. UDC drivers don't assign gadget.dev.release directly
. Removal of some unused DMA_ADDR_INVALID
. Introduction of CONFIG_USB_PHY
. All phy drivers have been moved to drivers/usb/phy and renamed to
a common naming scheme
. Fix PHY layer so it never returns a NULL pointer, also fix all
callers to avoid using IS_ERR_OR_NULL()
. Sparse fixes all over the place
. drivers/usb/otg/ has been deleted
. Marvel drivers (mv_udc, ehci-mv, mv_otg and mv_u3d) improved clock
usage

- new features:
. UDC core now provides a generic way for tracking and reporting
UDC's state (not attached, resuming, suspended, addressed,
default, etc)
. twl4030-usb learned that it shouldn't be enabled during init
. Full DT support for DWC3 has been implemented
. ab8500-usb learned about pinctrl framework
. nop PHY learned about DeviceTree and regulators
. DWC3 learned about suspend/resume
. DWC3 can now be compiled in host-only and gadget-only (as well as
DRD) configurations
. UVC now enables streaming endpoint based on negotiated speed
. isp1301 now implements the PHY API properly
. configfs-based interface for gadget drivers which will lead to
the removal of all code which just combines functions together
to build functional gadget drivers.
. f_serial and f_obex were converted to new configfs interface while
maintaining old interface around.

- non-critical fixes:
. UVC gadget driver got fixes for Endpoint usage and stream calculation
. ab8500-usb fixed unbalanced clock and regulator API usage
. twl4030-usb got a fix for when OMAP3 is booted with cable connected
. fusb300_udc got a fix for DMA usage
. UVC got fixes for two assertions of the USB Video Class Compliance
specification revision 1.1
. build warning issues caused by recent addition of __must_check to
regulator API

These are all changes which deserve a mention, all other changes are related
to these one or minor spelling fixes and other similar tasks.

Signed-of-by: Felipe Balbi <balbi@ti.com>
18 files changed:
1  2 
drivers/usb/chipidea/udc.c
drivers/usb/gadget/Kconfig
drivers/usb/gadget/f_rndis.c
drivers/usb/gadget/g_ffs.c
drivers/usb/gadget/net2272.c
drivers/usb/gadget/net2280.c
drivers/usb/gadget/udc-core.c
drivers/usb/host/Kconfig
drivers/usb/host/ehci-mv.c
drivers/usb/host/ehci-s5p.c
drivers/usb/host/ehci-tegra.c
drivers/usb/musb/da8xx.c
drivers/usb/musb/musb_gadget.c
drivers/usb/phy/Kconfig
drivers/usb/phy/phy-isp1301-omap.c
drivers/usb/phy/phy-mv-u3d-usb.c
drivers/usb/phy/phy-twl4030-usb.c
drivers/usb/phy/phy-twl6030-usb.c

@@@ -1708,19 -1742,18 +1692,13 @@@ static int udc_start(struct ci13xxx *ci
                retval = hw_device_reset(ci, USBMODE_CM_DC);
                if (retval)
                        goto put_transceiver;
 -              hw_enable_vbus_intr(ci);
        }
  
-       retval = device_register(&ci->gadget.dev);
-       if (retval) {
-               put_device(&ci->gadget.dev);
 -      retval = dbg_create_files(ci->dev);
 -      if (retval)
--              goto put_transceiver;
-       }
--
        if (!IS_ERR_OR_NULL(ci->transceiver)) {
                retval = otg_set_peripheral(ci->transceiver->otg,
                                                &ci->gadget);
                if (retval)
-                       goto unreg_device;
 -                      goto remove_dbg;
++                      goto put_transceiver;
        }
  
        retval = usb_add_gadget_udc(dev, &ci->gadget);
@@@ -1740,8 -1773,8 +1718,6 @@@ remove_trans
        }
  
        dev_err(dev, "error = %i\n", retval);
- unreg_device:
-       device_unregister(&ci->gadget.dev);
 -remove_dbg:
 -      dbg_remove_files(ci->dev);
  put_transceiver:
        if (!IS_ERR_OR_NULL(ci->transceiver) && ci->global_phy)
                usb_put_phy(ci->transceiver);
@@@ -1776,7 -1812,7 +1752,6 @@@ static void udc_stop(struct ci13xxx *ci
                if (ci->global_phy)
                        usb_put_phy(ci->transceiver);
        }
-       device_unregister(&ci->gadget.dev);
 -      dbg_remove_files(ci->dev);
        /* my kobject is dynamic, I swear! */
        memset(&ci->gadget, 0, sizeof(ci->gadget));
  }
Simple merge
Simple merge
@@@ -410,10 -416,10 +416,10 @@@ static int gfs_unbind(struct usb_compos
         * do...?
         */
        if (gfs_ether_setup)
-               gether_cleanup();
+               gether_cleanup(the_dev);
        gfs_ether_setup = false;
  
 -      for (i = func_num; --i; )
 +      for (i = func_num; i--; )
                if (ffs_tab[i].ffs_data)
                        functionfs_unbind(ffs_tab[i].ffs_data);
  
@@@ -58,8 -58,7 +58,7 @@@ static const char * const ep_name[] = 
        "ep-a", "ep-b", "ep-c",
  };
  
- #define DMA_ADDR_INVALID      (~(dma_addr_t)0)
 -#ifdef CONFIG_USB_GADGET_NET2272_DMA
 +#ifdef CONFIG_USB_NET2272_DMA
  /*
   * use_dma: the NET2272 can use an external DMA controller.
   * Note that since there is no generic DMA api, some functions,
@@@ -1924,7 -1920,7 +1920,6 @@@ static int net2280_start(struct usb_gad
  err_func:
        device_remove_file (&dev->pdev->dev, &dev_attr_function);
  err_unbind:
-       dev->gadget.dev.driver = NULL;
 -      driver->unbind (&dev->gadget);
        dev->driver = NULL;
        return retval;
  }
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -770,19 -765,15 +770,17 @@@ static int tegra_ehci_probe(struct plat
        if (!irq) {
                dev_err(&pdev->dev, "Failed to get IRQ\n");
                err = -ENODEV;
 -              goto fail;
 +              goto fail_phy;
        }
  
- #ifdef CONFIG_USB_OTG_UTILS
        if (pdata->operating_mode == TEGRA_USB_OTG) {
                tegra->transceiver =
                        devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
-               if (!IS_ERR_OR_NULL(tegra->transceiver))
+               if (!IS_ERR(tegra->transceiver))
                        otg_set_host(tegra->transceiver->otg, &hcd->self);
 +      } else {
 +              tegra->transceiver = ERR_PTR(-ENODEV);
        }
- #endif
  
        err = usb_add_hcd(hcd, irq, IRQF_SHARED);
        if (err) {
        return err;
  
  fail:
- #ifdef CONFIG_USB_OTG_UTILS
-       if (!IS_ERR_OR_NULL(tegra->transceiver))
+       if (!IS_ERR(tegra->transceiver))
                otg_set_host(tegra->transceiver->otg, NULL);
- #endif
 +fail_phy:
        usb_phy_shutdown(hcd->phy);
  fail_io:
        clk_disable_unprepare(tegra->clk);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge