From: Meng Dongyang Date: Tue, 17 Jan 2017 03:46:57 +0000 (+0800) Subject: usb: dwc_otg_310: set operational mode of phy to normal when suspend for rk3368 X-Git-Tag: release-20171130_firefly~4^2~75 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ce201dfb77b6e9640a48988a7aa0bbc0b15b9477;p=firefly-linux-kernel-4.4.55.git usb: dwc_otg_310: set operational mode of phy to normal when suspend for rk3368 The phy driver of otg port set operational mode to non-driving when suspend and set to normal when resume. But if we connect with low speed, it may be disconnected after suspend and resume by the changing of operational mode. In addition, the linestate change interrupt flag can't be cleared if the operational mode is non-driving. This patch set operational mode to normal even if the phy is suspended, and make sure that operational mode is same during suspend and resume. Change-Id: I670d2cbd4e7c4dc115a735feef848f36f120c295 Signed-off-by: Meng Dongyang Signed-off-by: William Wu --- diff --git a/drivers/usb/dwc_otg_310/usbdev_rk3368.c b/drivers/usb/dwc_otg_310/usbdev_rk3368.c index 3272e4e99c5f..1507bd37f020 100644 --- a/drivers/usb/dwc_otg_310/usbdev_rk3368.c +++ b/drivers/usb/dwc_otg_310/usbdev_rk3368.c @@ -37,7 +37,7 @@ static void usb20otg_phy_suspend(void *pdata, int suspend) struct dwc_otg_platform_data *usbpdata = pdata; if (suspend) { /* enable soft control */ - uoc_write(UOC_HIWORD_UPDATE(0x1d5, 0x1ff, 0), 0x700); + uoc_write(UOC_HIWORD_UPDATE(0x1d1, 0x1ff, 0), 0x700); usbpdata->phy_status = 1; } else { /* exit suspend */ @@ -240,7 +240,7 @@ static void usb20ehci_phy_suspend(void *pdata, int suspend) if (suspend) { /* enable soft control */ - uoc_write(UOC_HIWORD_UPDATE(0x1d5, 0x1ff, 0), 0x728); + uoc_write(UOC_HIWORD_UPDATE(0x1d1, 0x1ff, 0), 0x728); usbpdata->phy_status = 1; } else { /* exit suspend */