diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-05 18:18:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-05 18:18:00 -0400 |
commit | 64dc9e2e7320f079b97c46b106133b58b8e18d40 (patch) | |
tree | ab010dc1337d44e29c2b32b7f11788620a91fe4f /drivers/usb/chipidea/udc.c | |
parent | 01a60e76b6392547ad3dca3ac05b9c886fa5da45 (diff) | |
parent | 9b192de60b5a584ee4ed967fb6758773c75e4643 (diff) |
Merge tag 'usb-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
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>
Diffstat (limited to 'drivers/usb/chipidea/udc.c')
-rw-r--r-- | drivers/usb/chipidea/udc.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 3d90e6189731..519ead2443c5 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
@@ -1639,16 +1639,6 @@ static irqreturn_t udc_irq(struct ci13xxx *ci) | |||
1639 | } | 1639 | } |
1640 | 1640 | ||
1641 | /** | 1641 | /** |
1642 | * udc_release: driver release function | ||
1643 | * @dev: device | ||
1644 | * | ||
1645 | * Currently does nothing | ||
1646 | */ | ||
1647 | static void udc_release(struct device *dev) | ||
1648 | { | ||
1649 | } | ||
1650 | |||
1651 | /** | ||
1652 | * udc_start: initialize gadget role | 1642 | * udc_start: initialize gadget role |
1653 | * @ci: chipidea controller | 1643 | * @ci: chipidea controller |
1654 | */ | 1644 | */ |
@@ -1667,12 +1657,6 @@ static int udc_start(struct ci13xxx *ci) | |||
1667 | 1657 | ||
1668 | INIT_LIST_HEAD(&ci->gadget.ep_list); | 1658 | INIT_LIST_HEAD(&ci->gadget.ep_list); |
1669 | 1659 | ||
1670 | dev_set_name(&ci->gadget.dev, "gadget"); | ||
1671 | ci->gadget.dev.dma_mask = dev->dma_mask; | ||
1672 | ci->gadget.dev.coherent_dma_mask = dev->coherent_dma_mask; | ||
1673 | ci->gadget.dev.parent = dev; | ||
1674 | ci->gadget.dev.release = udc_release; | ||
1675 | |||
1676 | /* alloc resources */ | 1660 | /* alloc resources */ |
1677 | ci->qh_pool = dma_pool_create("ci13xxx_qh", dev, | 1661 | ci->qh_pool = dma_pool_create("ci13xxx_qh", dev, |
1678 | sizeof(struct ci13xxx_qh), | 1662 | sizeof(struct ci13xxx_qh), |
@@ -1710,17 +1694,11 @@ static int udc_start(struct ci13xxx *ci) | |||
1710 | goto put_transceiver; | 1694 | goto put_transceiver; |
1711 | } | 1695 | } |
1712 | 1696 | ||
1713 | retval = device_register(&ci->gadget.dev); | ||
1714 | if (retval) { | ||
1715 | put_device(&ci->gadget.dev); | ||
1716 | goto put_transceiver; | ||
1717 | } | ||
1718 | |||
1719 | if (!IS_ERR_OR_NULL(ci->transceiver)) { | 1697 | if (!IS_ERR_OR_NULL(ci->transceiver)) { |
1720 | retval = otg_set_peripheral(ci->transceiver->otg, | 1698 | retval = otg_set_peripheral(ci->transceiver->otg, |
1721 | &ci->gadget); | 1699 | &ci->gadget); |
1722 | if (retval) | 1700 | if (retval) |
1723 | goto unreg_device; | 1701 | goto put_transceiver; |
1724 | } | 1702 | } |
1725 | 1703 | ||
1726 | retval = usb_add_gadget_udc(dev, &ci->gadget); | 1704 | retval = usb_add_gadget_udc(dev, &ci->gadget); |
@@ -1740,8 +1718,6 @@ remove_trans: | |||
1740 | } | 1718 | } |
1741 | 1719 | ||
1742 | dev_err(dev, "error = %i\n", retval); | 1720 | dev_err(dev, "error = %i\n", retval); |
1743 | unreg_device: | ||
1744 | device_unregister(&ci->gadget.dev); | ||
1745 | put_transceiver: | 1721 | put_transceiver: |
1746 | if (!IS_ERR_OR_NULL(ci->transceiver) && ci->global_phy) | 1722 | if (!IS_ERR_OR_NULL(ci->transceiver) && ci->global_phy) |
1747 | usb_put_phy(ci->transceiver); | 1723 | usb_put_phy(ci->transceiver); |
@@ -1776,7 +1752,6 @@ static void udc_stop(struct ci13xxx *ci) | |||
1776 | if (ci->global_phy) | 1752 | if (ci->global_phy) |
1777 | usb_put_phy(ci->transceiver); | 1753 | usb_put_phy(ci->transceiver); |
1778 | } | 1754 | } |
1779 | device_unregister(&ci->gadget.dev); | ||
1780 | /* my kobject is dynamic, I swear! */ | 1755 | /* my kobject is dynamic, I swear! */ |
1781 | memset(&ci->gadget, 0, sizeof(ci->gadget)); | 1756 | memset(&ci->gadget, 0, sizeof(ci->gadget)); |
1782 | } | 1757 | } |