Loading drivers/usb/phy/phy-msm-usb.c +7 −2 Original line number Diff line number Diff line Loading @@ -891,7 +891,7 @@ static int msm_otg_suspend(struct msm_otg *motg) struct msm_otg_platform_data *pdata = motg->pdata; int cnt = 0; bool host_bus_suspend, device_bus_suspend, dcp, prop_charger; bool floated_charger; bool floated_charger, sm_work_busy; u32 phy_ctrl_val = 0, cmd_val; unsigned ret; u32 portsc, config2; Loading @@ -915,6 +915,10 @@ static int msm_otg_suspend(struct msm_otg *motg) prop_charger = motg->chg_type == USB_PROPRIETARY_CHARGER; floated_charger = motg->chg_type == USB_FLOATED_CHARGER; /* !BSV, but its handling is in progress by otg sm_work */ sm_work_busy = !test_bit(B_SESS_VLD, &motg->inputs) && phy->state == OTG_STATE_B_PERIPHERAL; /* Enable line state difference wakeup fix for only device and host * bus suspend scenarios. Otherwise PHY can not be suspended when * a charger that pulls DP/DM high is connected. Loading @@ -930,11 +934,12 @@ static int msm_otg_suspend(struct msm_otg *motg) * Abort suspend when, * 1. charging detection in progress due to cable plug-in * 2. host mode activation in progress due to Micro-A cable insertion * 3. !BSV, but its handling is in progress by otg sm_work */ if ((test_bit(B_SESS_VLD, &motg->inputs) && !device_bus_suspend && !dcp && !prop_charger && !floated_charger) || test_bit(A_BUS_REQ, &motg->inputs)) { test_bit(A_BUS_REQ, &motg->inputs) || sm_work_busy) { motg->ui_enabled = 1; enable_irq(motg->irq); return -EBUSY; Loading Loading
drivers/usb/phy/phy-msm-usb.c +7 −2 Original line number Diff line number Diff line Loading @@ -891,7 +891,7 @@ static int msm_otg_suspend(struct msm_otg *motg) struct msm_otg_platform_data *pdata = motg->pdata; int cnt = 0; bool host_bus_suspend, device_bus_suspend, dcp, prop_charger; bool floated_charger; bool floated_charger, sm_work_busy; u32 phy_ctrl_val = 0, cmd_val; unsigned ret; u32 portsc, config2; Loading @@ -915,6 +915,10 @@ static int msm_otg_suspend(struct msm_otg *motg) prop_charger = motg->chg_type == USB_PROPRIETARY_CHARGER; floated_charger = motg->chg_type == USB_FLOATED_CHARGER; /* !BSV, but its handling is in progress by otg sm_work */ sm_work_busy = !test_bit(B_SESS_VLD, &motg->inputs) && phy->state == OTG_STATE_B_PERIPHERAL; /* Enable line state difference wakeup fix for only device and host * bus suspend scenarios. Otherwise PHY can not be suspended when * a charger that pulls DP/DM high is connected. Loading @@ -930,11 +934,12 @@ static int msm_otg_suspend(struct msm_otg *motg) * Abort suspend when, * 1. charging detection in progress due to cable plug-in * 2. host mode activation in progress due to Micro-A cable insertion * 3. !BSV, but its handling is in progress by otg sm_work */ if ((test_bit(B_SESS_VLD, &motg->inputs) && !device_bus_suspend && !dcp && !prop_charger && !floated_charger) || test_bit(A_BUS_REQ, &motg->inputs)) { test_bit(A_BUS_REQ, &motg->inputs) || sm_work_busy) { motg->ui_enabled = 1; enable_irq(motg->irq); return -EBUSY; Loading