usb: dwc3: Suspend USB SS PHY in host mode with device connect case
Currently driver is not suspending USB Super Speed PHY (here USB QMP PHY) with below usecases. a. USB super speed HUB is connected and going into bus suspend b. USB super speed HUB is connected and having USB super speed device connected on HUB's downstream port This results into no USB super speed device connect or removal being detected as autonomous mode is not being enabled with USB QMP PHY. Fix these issues by suspending USB SS PHY in host mode with device connect (i.e. HUB or HUB with USB SS device connected) case. Change-Id: I469b02f0845228f55d9253e7683ea3c133fd9542 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This commit is contained in:
parent
f56ee1db81
commit
c2e482aa78
1 changed files with 1 additions and 6 deletions
|
@ -1996,7 +1996,6 @@ static void msm_dwc3_perf_vote_update(struct dwc3_msm *mdwc,
|
||||||
static int dwc3_msm_suspend(struct dwc3_msm *mdwc)
|
static int dwc3_msm_suspend(struct dwc3_msm *mdwc)
|
||||||
{
|
{
|
||||||
int ret, i;
|
int ret, i;
|
||||||
bool can_suspend_ssphy;
|
|
||||||
struct dwc3 *dwc = platform_get_drvdata(mdwc->dwc3);
|
struct dwc3 *dwc = platform_get_drvdata(mdwc->dwc3);
|
||||||
|
|
||||||
dbg_event(0xFF, "Ctl Sus", atomic_read(&dwc->in_lpm));
|
dbg_event(0xFF, "Ctl Sus", atomic_read(&dwc->in_lpm));
|
||||||
|
@ -2065,10 +2064,6 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize variables here */
|
|
||||||
can_suspend_ssphy = !(mdwc->in_host_mode &&
|
|
||||||
dwc3_msm_is_host_superspeed(mdwc));
|
|
||||||
|
|
||||||
/* Disable core irq */
|
/* Disable core irq */
|
||||||
if (dwc->irq)
|
if (dwc->irq)
|
||||||
disable_irq(dwc->irq);
|
disable_irq(dwc->irq);
|
||||||
|
@ -2084,7 +2079,7 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc)
|
||||||
usb_phy_set_suspend(mdwc->hs_phy, 1);
|
usb_phy_set_suspend(mdwc->hs_phy, 1);
|
||||||
|
|
||||||
/* Suspend SS PHY */
|
/* Suspend SS PHY */
|
||||||
if (dwc->maximum_speed == USB_SPEED_SUPER && can_suspend_ssphy) {
|
if (dwc->maximum_speed == USB_SPEED_SUPER) {
|
||||||
/* indicate phy about SS mode */
|
/* indicate phy about SS mode */
|
||||||
if (dwc3_msm_is_superspeed(mdwc))
|
if (dwc3_msm_is_superspeed(mdwc))
|
||||||
mdwc->ss_phy->flags |= DEVICE_IN_SS_MODE;
|
mdwc->ss_phy->flags |= DEVICE_IN_SS_MODE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue