Skip to contentSkip to conversation

move OMAP's transceiver glue to drivers/usb/otg

PATCH In review David Brownell 1 participant 1 message Dec 1, 2008

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 4/5 move OMAP's transceiver glue to drivers/usb/otg

From: Tony Lindgren <[email protected]>

Move otg_get/set/put_transceiver() from omap specific code to common otg.c so other upcoming drivers can share them.

[ [email protected]: move to drivers/usb/otg, dox ]

---
This might need some more updates yet ...

 arch/arm/plat-omap/usb.c |   38 --------------------------
 drivers/usb/otg/Makefile |   11 ++++---
 drivers/usb/otg/otg.c    |   65 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 71 insertions(+), 43 deletions(-)
arch/arm/plat-omap/usb.c +0 -38
@@ -77,44 +77,6 @@
 
 /*-------------------------------------------------------------------------*/
 
-#if	defined(CONFIG_ARCH_OMAP_OTG) || defined(CONFIG_USB_MUSB_OTG)
-
-static struct otg_transceiver *xceiv;
-
-/**
- * otg_get_transceiver - find the (single) OTG transceiver driver
- *
- * Returns the transceiver driver, after getting a refcount to it; or
- * null if there is no such transceiver.  The caller is responsible for
- * releasing that count.
- */
-struct otg_transceiver *otg_get_transceiver(void)
-{
-	if (xceiv)
-		get_device(xceiv->dev);
-	return xceiv;
-}
-EXPORT_SYMBOL(otg_get_transceiver);
-
-void otg_put_transceiver(struct otg_transceiver *x)
-{
-	put_device(x->dev);
-}
-EXPORT_SYMBOL(otg_put_transceiver);
-
-int otg_set_transceiver(struct otg_transceiver *x)
-{
-	if (xceiv && x)
-		return -EBUSY;
-	xceiv = x;
-	return 0;
-}
-EXPORT_SYMBOL(otg_set_transceiver);
-
-#endif
-
-/*-------------------------------------------------------------------------*/
-
 #if defined(CONFIG_ARCH_OMAP_OTG) || defined(CONFIG_ARCH_OMAP15XX)
 
 static void omap2_usb_devconf_clear(u8 port, u32 mask)
drivers/usb/otg/Makefile +6 -5
@@ -2,12 +2,13 @@
 # OTG infrastructure and transceiver drivers
 #
 
+# infrastructure
+obj-$(CONFIG_USB_OTG_UTILS)	+= otg.o
+
+# transceiver drivers
 obj-$(CONFIG_USB_GPIO_VBUS)	+= gpio_vbus.o
 obj-$(CONFIG_ISP1301_OMAP)	+= isp1301_omap.o
 
-ifeq ($(CONFIG_USB_DEBUG),y)
-EXTRA_CFLAGS += -DDEBUG
-else ifeq ($(CONFIG_USB_GADGET_DEBUG),y)
-EXTRA_CFLAGS += -DDEBUG
-endif
+ccflags-$(CONFIG_USB_DEBUG)	+= -DDEBUG
+ccflags-$(CONFIG_USB_GADGET_DEBUG) += -DDEBUG
 
drivers/usb/otg/otg.c new file +65 -0

65 lines not on this page · raw message