OSDN Git Service

Merge "USB: policy_engine: Enable VBUS after VCONN before PE_SRC_Startup"
authorLinux Build Service Account <lnxbuild@quicinc.com>
Tue, 25 Jul 2017 07:35:44 +0000 (00:35 -0700)
committerGerrit - the friendly Code Review server <code-review@localhost>
Tue, 25 Jul 2017 07:35:43 +0000 (00:35 -0700)
drivers/usb/pd/policy_engine.c

index 3f1c2b3..0cbe953 100644 (file)
@@ -1702,7 +1702,6 @@ static void usbpd_sm(struct work_struct *w)
                if (pd->current_pr == PR_SINK) {
                        usbpd_set_state(pd, PE_SNK_STARTUP);
                } else if (pd->current_pr == PR_SRC) {
-                       enable_vbus(pd);
                        if (!pd->vconn_enabled &&
                                        pd->typec_mode ==
                                        POWER_SUPPLY_TYPEC_SINK_POWERED_CABLE) {
@@ -1712,6 +1711,7 @@ static void usbpd_sm(struct work_struct *w)
                                else
                                        pd->vconn_enabled = true;
                        }
+                       enable_vbus(pd);
 
                        usbpd_set_state(pd, PE_SRC_STARTUP);
                }