diff options
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r-- | drivers/usb/chipidea/core.c | 4 | ||||
-rw-r--r-- | drivers/usb/chipidea/host.c | 3 | ||||
-rw-r--r-- | drivers/usb/chipidea/udc.c | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 5d8981c5235e..6e73f8cd60e5 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c | |||
@@ -642,6 +642,10 @@ static int ci_hdrc_probe(struct platform_device *pdev) | |||
642 | : CI_ROLE_GADGET; | 642 | : CI_ROLE_GADGET; |
643 | } | 643 | } |
644 | 644 | ||
645 | /* only update vbus status for peripheral */ | ||
646 | if (ci->role == CI_ROLE_GADGET) | ||
647 | ci_handle_vbus_change(ci); | ||
648 | |||
645 | ret = ci_role_start(ci, ci->role); | 649 | ret = ci_role_start(ci, ci->role); |
646 | if (ret) { | 650 | if (ret) { |
647 | dev_err(dev, "can't start %s role\n", ci_role(ci)->name); | 651 | dev_err(dev, "can't start %s role\n", ci_role(ci)->name); |
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 59e6020ea753..526cd77563d8 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c | |||
@@ -88,7 +88,8 @@ static int host_start(struct ci_hdrc *ci) | |||
88 | return ret; | 88 | return ret; |
89 | 89 | ||
90 | disable_reg: | 90 | disable_reg: |
91 | regulator_disable(ci->platdata->reg_vbus); | 91 | if (ci->platdata->reg_vbus) |
92 | regulator_disable(ci->platdata->reg_vbus); | ||
92 | 93 | ||
93 | put_hcd: | 94 | put_hcd: |
94 | usb_put_hcd(hcd); | 95 | usb_put_hcd(hcd); |
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index b34c81969cba..69d20fbb38a2 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
@@ -1795,9 +1795,6 @@ static int udc_start(struct ci_hdrc *ci) | |||
1795 | pm_runtime_no_callbacks(&ci->gadget.dev); | 1795 | pm_runtime_no_callbacks(&ci->gadget.dev); |
1796 | pm_runtime_enable(&ci->gadget.dev); | 1796 | pm_runtime_enable(&ci->gadget.dev); |
1797 | 1797 | ||
1798 | /* Update ci->vbus_active */ | ||
1799 | ci_handle_vbus_change(ci); | ||
1800 | |||
1801 | return retval; | 1798 | return retval; |
1802 | 1799 | ||
1803 | destroy_eps: | 1800 | destroy_eps: |