diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-13 12:11:40 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-13 12:11:40 +0100 |
commit | 845f081002eebd7a1216fc0a5ef2c862dc6d093e (patch) | |
tree | 41f5ee3829836aafc4d872edf2c2e22390ae6034 /drivers/usb/chipidea | |
parent | 585c91f40d201bc564d4e76b83c05b3b5363fe7e (diff) | |
parent | b3a987b0264d3ddbb24293ebff10eddfc472f653 (diff) | |
download | linux-845f081002eebd7a1216fc0a5ef2c862dc6d093e.tar.gz linux-845f081002eebd7a1216fc0a5ef2c862dc6d093e.tar.bz2 linux-845f081002eebd7a1216fc0a5ef2c862dc6d093e.zip |
Merge 5.5-rc6 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
-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 b45ceb91c735..48e4a5ca1835 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -26,6 +26,7 @@ static int (*orig_bus_suspend)(struct usb_hcd *hcd); struct ehci_ci_priv { struct regulator *reg_vbus; + bool enabled; }; static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable) @@ -37,7 +38,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"); @@ -53,6 +54,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)) { |