Loading drivers/usb/pd/policy_engine.c +8 −1 Original line number Diff line number Diff line Loading @@ -2552,6 +2552,7 @@ static int usbpd_dr_set_property(struct dual_role_phy_instance *dual_role, { struct usbpd *pd = dual_role_get_drvdata(dual_role); bool do_swap = false; int wait_count = 5; if (!pd) return -ENODEV; Loading @@ -2578,9 +2579,15 @@ static int usbpd_dr_set_property(struct dual_role_phy_instance *dual_role, set_power_role(pd, PR_NONE); /* wait until it takes effect */ while (pd->forced_pr != POWER_SUPPLY_TYPEC_PR_NONE) while (pd->forced_pr != POWER_SUPPLY_TYPEC_PR_NONE && --wait_count) msleep(20); if (!wait_count) { usbpd_err(&pd->dev, "setting mode timed out\n"); return -ETIMEDOUT; } break; case DUAL_ROLE_PROP_DR: Loading Loading
drivers/usb/pd/policy_engine.c +8 −1 Original line number Diff line number Diff line Loading @@ -2552,6 +2552,7 @@ static int usbpd_dr_set_property(struct dual_role_phy_instance *dual_role, { struct usbpd *pd = dual_role_get_drvdata(dual_role); bool do_swap = false; int wait_count = 5; if (!pd) return -ENODEV; Loading @@ -2578,9 +2579,15 @@ static int usbpd_dr_set_property(struct dual_role_phy_instance *dual_role, set_power_role(pd, PR_NONE); /* wait until it takes effect */ while (pd->forced_pr != POWER_SUPPLY_TYPEC_PR_NONE) while (pd->forced_pr != POWER_SUPPLY_TYPEC_PR_NONE && --wait_count) msleep(20); if (!wait_count) { usbpd_err(&pd->dev, "setting mode timed out\n"); return -ETIMEDOUT; } break; case DUAL_ROLE_PROP_DR: Loading