diff options
Diffstat (limited to 'drivers/usb/chipidea/host.c')
-rw-r--r-- | drivers/usb/chipidea/host.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 4b687bb8db0c..2118fd092543 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -42,6 +42,7 @@ static int (*orig_hub_control)(struct usb_hcd *hcd, struct ehci_ci_priv { struct regulator *reg_vbus; + bool enabled; }; /* This function is used to override WKCN, WKDN, and WKOC */ @@ -67,7 +68,7 @@ static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable) int ret = 0; int port = HCS_N_PORTS(ehci->hcs_params); - if (priv->reg_vbus) { + if (priv->reg_vbus && enable != priv->enabled) { if (port > 1) { dev_warn(dev, "Not support multi-port regulator control\n"); @@ -83,6 +84,7 @@ static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable) enable ? "enable" : "disable", ret); return ret; } + priv->enabled = enable; } if (enable && (ci->platdata->phy_mode == USBPHY_INTERFACE_MODE_HSIC)) { |