Merge "usb: pd: policy_engine: Disable vconn first upon disconnect"
This commit is contained in:
commit
aa6325414f
1 changed files with 6 additions and 6 deletions
|
@ -1539,6 +1539,11 @@ static void usbpd_sm(struct work_struct *w)
|
||||||
if (pd->current_state == PE_UNKNOWN)
|
if (pd->current_state == PE_UNKNOWN)
|
||||||
goto sm_done;
|
goto sm_done;
|
||||||
|
|
||||||
|
if (pd->vconn_enabled) {
|
||||||
|
regulator_disable(pd->vconn);
|
||||||
|
pd->vconn_enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
usbpd_info(&pd->dev, "USB Type-C disconnect\n");
|
usbpd_info(&pd->dev, "USB Type-C disconnect\n");
|
||||||
|
|
||||||
if (pd->pd_phy_opened) {
|
if (pd->pd_phy_opened) {
|
||||||
|
@ -1574,11 +1579,6 @@ static void usbpd_sm(struct work_struct *w)
|
||||||
pd->vbus_enabled = false;
|
pd->vbus_enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pd->vconn_enabled) {
|
|
||||||
regulator_disable(pd->vconn);
|
|
||||||
pd->vconn_enabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pd->current_dr == DR_UFP)
|
if (pd->current_dr == DR_UFP)
|
||||||
stop_usb_peripheral(pd);
|
stop_usb_peripheral(pd);
|
||||||
else if (pd->current_dr == DR_DFP)
|
else if (pd->current_dr == DR_DFP)
|
||||||
|
@ -3187,7 +3187,7 @@ struct usbpd *usbpd_create(struct device *parent)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto free_pd;
|
goto free_pd;
|
||||||
|
|
||||||
pd->wq = alloc_ordered_workqueue("usbpd_wq", WQ_FREEZABLE);
|
pd->wq = alloc_ordered_workqueue("usbpd_wq", WQ_FREEZABLE | WQ_HIGHPRI);
|
||||||
if (!pd->wq) {
|
if (!pd->wq) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto del_pd;
|
goto del_pd;
|
||||||
|
|
Loading…
Add table
Reference in a new issue