Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 458ed9f9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: pd: policy_engine: Disable vconn first upon disconnect"

parents 7db7a489 86bd10fc
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1542,6 +1542,11 @@ static void usbpd_sm(struct work_struct *w)
		if (pd->current_state == PE_UNKNOWN)
			goto sm_done;

		if (pd->vconn_enabled) {
			regulator_disable(pd->vconn);
			pd->vconn_enabled = false;
		}

		usbpd_info(&pd->dev, "USB Type-C disconnect\n");

		if (pd->pd_phy_opened) {
@@ -1577,11 +1582,6 @@ static void usbpd_sm(struct work_struct *w)
			pd->vbus_enabled = false;
		}

		if (pd->vconn_enabled) {
			regulator_disable(pd->vconn);
			pd->vconn_enabled = false;
		}

		reset_vdm_state(pd);
		if (pd->current_dr == DR_UFP)
			stop_usb_peripheral(pd);
@@ -3190,7 +3190,7 @@ struct usbpd *usbpd_create(struct device *parent)
	if (ret)
		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) {
		ret = -ENOMEM;
		goto del_pd;