goto err_regulator;
#endif
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
- if (priv->vbus_supply) {
- ret = regulator_set_enable(priv->vbus_supply,
- (type == USB_INIT_DEVICE) ?
- false : true);
- if (ret && ret != -ENOSYS) {
- printf("Error enabling VBUS supply (ret=%i)\n", ret);
- goto err_clk;
- }
- }
-#endif
-
if (priv->init_type == USB_INIT_HOST) {
setbits_le32(&ehci->usbmode, CM_HOST);
writel(mx6_portsc(priv->phy_type), &ehci->portsc);
generic_shutdown_phy(&priv->phy);
err_regulator:
#endif
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
- if (priv->vbus_supply)
- regulator_set_enable(priv->vbus_supply, false);
-#endif
err_clk:
#if CONFIG_IS_ENABLED(CLK)
clk_disable(&priv->clk);