From: lyz Date: Wed, 11 Feb 2015 10:38:50 +0000 (+0800) Subject: usb: rk3368: support wake up by usb plug X-Git-Tag: firefly_0821_release~4158^2~447^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3361a4c55589f5912570700cda8b0093761d8b3e;p=firefly-linux-kernel-4.4.55.git usb: rk3368: support wake up by usb plug Signed-off-by: lyz --- diff --git a/drivers/usb/dwc_otg_310/usbdev_rk3368.c b/drivers/usb/dwc_otg_310/usbdev_rk3368.c index af08389972c8..c7521a9cf9c6 100644 --- a/drivers/usb/dwc_otg_310/usbdev_rk3368.c +++ b/drivers/usb/dwc_otg_310/usbdev_rk3368.c @@ -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; }