USB: add remote wakeup and detect by otg bvalid in defconfig
authorwlf <wulf@rock-chips.com>
Wed, 12 Mar 2014 01:10:30 +0000 (09:10 +0800)
committerwlf <wulf@rock-chips.com>
Wed, 12 Mar 2014 01:10:30 +0000 (09:10 +0800)
drivers/usb/dwc_otg_310/Kconfig
drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c

index e885c8afd02082ab1faa0f25d584d4b70e70b9c1..a0280d9ae0a3702517239ede53d4fc277c79e55d 100755 (executable)
@@ -29,3 +29,13 @@ config DWC_OTG
        tristate
        depends on DWC_OTG_310  
        default y if USB11_HOST || USB20_HOST || USB20_OTG 
+
+config DWC_REMOTE_WAKEUP
+       bool "remote wakeup support in DWC_OTG controller"
+       depends on DWC_OTG_310
+       default y if USB20_HOST || USB20_OTG
+
+config RK_USB_DETECT_BY_OTG_BVALID
+       bool "Wakeup system by OTG BVALID interrupt when USB OTG conneted"
+       depends on USB_GADGET && ARCH_ROCKCHIP
+       default y if USB20_HOST || USB20_OTG
index 7ec0781ec6a5a6c83841594b4047082f1b792be5..0ee449f4f6fd20bed347084c42406260fccf24f1 100755 (executable)
@@ -749,7 +749,7 @@ static int dwc_otg_hcd_suspend(struct usb_hcd *hcd)
                pcgcctl.b.stoppclk = 1;//stop phy clk
                DWC_WRITE_REG32(core_if->pcgcctl, pcgcctl.d32);
        }
-#if 0 //ndef CONFIG_DWC_REMOTE_WAKEUP
+#ifndef CONFIG_DWC_REMOTE_WAKEUP
        else{ //no device connect
                if(pldata->phy_suspend) 
                pldata->phy_suspend(pldata, USB_PHY_SUSPEND);
@@ -784,7 +784,7 @@ static int dwc_otg_hcd_resume(struct usb_hcd *hcd)
                return 0;
 //#endif
 
-#if 0 //ndef CONFIG_DWC_REMOTE_WAKEUP
+#ifndef CONFIG_DWC_REMOTE_WAKEUP
        if (pldata->clock_enable) 
                pldata->clock_enable( pldata, 1);
 #endif
@@ -843,7 +843,7 @@ static int dwc_otg_hcd_resume(struct usb_hcd *hcd)
        
                mdelay(10);
        }
-#if 0 //ndef CONFIG_DWC_REMOTE_WAKEUP
+#ifndef CONFIG_DWC_REMOTE_WAKEUP
        else{
                if(pldata->phy_suspend) 
                pldata->phy_suspend( pldata, USB_PHY_ENABLED);