Revert "usb: dwc3: debugfs: dual role switch through debugfs entries"
authorVishal Mahaveer <vishalm@ti.com>
Wed, 6 May 2015 21:44:58 +0000 (16:44 -0500)
committerVishal Mahaveer <vishalm@ti.com>
Wed, 6 May 2015 21:46:20 +0000 (16:46 -0500)
This reverts commit b2a6a3d144669701732568cde5cce17aa37c1ae1.

Reverting this patch for pulling in new DRD framework changes.

Change-Id: I0fb0e55619a37abe4162fcc8e09236ae239158b9
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
drivers/usb/dwc3/debugfs.c
drivers/usb/dwc3/dwc3-omap.c
include/linux/usb/drd.h

index 0cc5a015451b65d5601febf82a239fd98d0cdda1..9ac37fe1b6a77956d530642db517e57eb3481fe8 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/uaccess.h>
 
 #include <linux/usb/ch9.h>
-#include <linux/usb/drd.h>
 
 #include "core.h"
 #include "gadget.h"
@@ -413,15 +412,7 @@ static ssize_t dwc3_mode_write(struct file *file,
 
        if (mode) {
                spin_lock_irqsave(&dwc->lock, flags);
-               if (mode & DWC3_GCTL_PRTCAP_HOST) {
-                       dwc3_omap_usbvbus_id_handler(dwc->dev->parent,
-                               OMAP_DWC3_ID_GROUND);
-                       mode = 0;
-               } else if (mode & DWC3_GCTL_PRTCAP_DEVICE) {
-                       dwc3_omap_usbvbus_id_handler(dwc->dev->parent,
-                               OMAP_DWC3_VBUS_VALID);
-                       mode = 1;
-               }
+               dwc3_set_mode(dwc, mode);
                spin_unlock_irqrestore(&dwc->lock, flags);
        }
        return count;
index 96b4c46cbbd2925063b6b71c42ca00e7742f4d7b..4ccdef7333c0e74da0bb99dc9fdcbb2f6bfda906 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/regulator/consumer.h>
 
 #include <linux/usb/otg.h>
-#include <linux/usb/drd.h>
 
 /*
  * All these registers belong to OMAP's Wrapper around the
@@ -138,6 +137,13 @@ struct dwc3_omap {
        struct regulator        *vbus_reg;
 };
 
+enum omap_dwc3_vbus_id_status {
+       OMAP_DWC3_ID_FLOAT,
+       OMAP_DWC3_ID_GROUND,
+       OMAP_DWC3_VBUS_OFF,
+       OMAP_DWC3_VBUS_VALID,
+};
+
 static inline u32 dwc3_omap_readl(void __iomem *base, u32 offset)
 {
        return readl(base + offset);
@@ -272,28 +278,6 @@ static void dwc3_omap_set_mailbox(struct dwc3_omap *omap,
        }
 }
 
-int dwc3_omap_usbvbus_id_handler(struct device *dev,
-       enum omap_dwc3_vbus_id_status status)
-{
-       struct dwc3_omap        *omap;
-       struct platform_device  *pdev;
-
-       if (!dev)
-               return -ENODEV;
-
-       dev_dbg(omap->dev, "VBUS Connect\n");
-
-       pdev = to_platform_device(dev);
-       omap =  platform_get_drvdata(pdev);
-       if (!omap)
-               return -ENODEV;
-
-       dwc3_omap_set_mailbox(omap, status);
-
-       return 0;
-}
-EXPORT_SYMBOL(dwc3_omap_usbvbus_id_handler);
-
 static irqreturn_t dwc3_omap_interrupt(int irq, void *_omap)
 {
        struct dwc3_omap        *omap = _omap;
index 6a9c3ce563537f87ea7cfda0a56c518f7dab5a3b..71c64dcd93e52a50e7761ec041ceeff14676c73d 100644 (file)
@@ -22,13 +22,6 @@ struct usb_drd_gadget {
        struct usb_drd_setup *gadget_setup;
 };
 
-enum omap_dwc3_vbus_id_status {
-       OMAP_DWC3_ID_FLOAT,
-       OMAP_DWC3_ID_GROUND,
-       OMAP_DWC3_VBUS_OFF,
-       OMAP_DWC3_VBUS_VALID,
-};
-
 #define DRD_UNREGISTERED       0x0
 #define DRD_DEVICE_REGISTERED  0x1
 #define DRD_HOST_REGISTERED    0x2
@@ -52,8 +45,6 @@ int usb_drd_stop_hcd(struct device *parent);
 int usb_drd_start_udc(struct device *parent);
 int usb_drd_stop_udc(struct device *parent);
 int usb_drd_get_state(struct device *parent);
-int dwc3_omap_usbvbus_id_handler(struct device *dev,
-       enum omap_dwc3_vbus_id_status status);
 #else
 static inline int usb_drd_release(struct device *parent)
 { return 0; }