OSDN Git Service

usb: dwc2: gadget: Fix Remote Wakeup interrupt bit clearing
authorMinas Harutyunyan <minas.harutyunyan@synopsys.com>
Wed, 12 Dec 2018 12:44:32 +0000 (16:44 +0400)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 17 Jan 2019 13:56:53 +0000 (15:56 +0200)
To clear GINTSTS2_WKUP_ALERT_INT bit in GINTSTS2 register
require to write 1. This bit is implemented as "Write to clear".

Fixes: 187c5298a122 ("usb: dwc2: gadget: Add handler for WkupAlert interrupt")

Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c

index 68ad75a..55ef3cc 100644 (file)
@@ -261,7 +261,7 @@ static void dwc2_gadget_wkup_alert_handler(struct dwc2_hsotg *hsotg)
 
        if (gintsts2 & GINTSTS2_WKUP_ALERT_INT) {
                dev_dbg(hsotg->dev, "%s: Wkup_Alert_Int\n", __func__);
-               dwc2_clear_bit(hsotg, GINTSTS2, GINTSTS2_WKUP_ALERT_INT);
+               dwc2_set_bit(hsotg, GINTSTS2, GINTSTS2_WKUP_ALERT_INT);
                dwc2_set_bit(hsotg, DCTL, DCTL_RMTWKUPSIG);
        }
 }