usb: rk3368: support wake up by usb plug
authorlyz <lyz@rock-chips.com>
Wed, 11 Feb 2015 10:38:50 +0000 (18:38 +0800)
committerlyz <lyz@rock-chips.com>
Wed, 11 Feb 2015 11:25:24 +0000 (19:25 +0800)
Signed-off-by: lyz <lyz@rock-chips.com>
drivers/usb/dwc_otg_310/usbdev_rk3368.c

index af08389972c8ceb6c6db09205ef74e3c5d420019..c7521a9cf9c65d3dc87949f914a900aa0a16f1ea 100644 (file)
@@ -328,7 +328,7 @@ static void usb_battery_charger_detect_work(struct work_struct *work)
 static irqreturn_t bvalid_irq_handler(int irq, void *dev_id)
 {
        /* clear irq */
-       uoc_write(UOC_HIWORD_UPDATE(0x1, 0x1, 3), 0x690);
+       uoc_write(UOC_HIWORD_UPDATE(0x1, 0x1, 3), 0x6a0);
 #ifdef CONFIG_RK_USB_UART
        /* usb otg dp/dm switch to usb phy */
        dwc_otg_uart_mode(NULL, PHY_USB_MODE);
@@ -355,7 +355,7 @@ static int otg_irq_detect_init(struct platform_device *pdev)
        wake_lock_init(&control_usb->usb_wakelock, WAKE_LOCK_SUSPEND,
                       "usb_detect");
        INIT_DELAYED_WORK(&control_usb->usb_det_wakeup_work, do_wakeup);
-#if 0
+
        /*register otg_bvalid irq */
        irq = platform_get_irq_byname(pdev, "otg_bvalid");
        if ((irq > 0) && control_usb->usb_irq_wakeup) {
@@ -368,7 +368,7 @@ static int otg_irq_detect_init(struct platform_device *pdev)
                        uoc_write(UOC_HIWORD_UPDATE(0x1, 0x1, 3), 0x680);
                }
        }
-#endif
+
        return 0;
 }