[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220425171412.1188485-5-sean.anderson@seco.com>
Date: Mon, 25 Apr 2022 13:14:11 -0400
From: Sean Anderson <sean.anderson@...o.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org
Cc: Mike Looijmans <mike.looijmans@...ic.nl>,
Linus Walleij <linus.walleij@...aro.org>,
Jules Maselbas <jmaselbas@...ray.eu>,
Felipe Balbi <balbi@...nel.org>,
Jonathan Hunter <jonathanh@...dia.com>,
linux-kernel@...r.kernel.org,
Robert Jarzmik <robert.jarzmik@...e.fr>,
Sean Anderson <sean.anderson@...o.com>
Subject: [PATCH v2 4/4] usb: phy: generic: Disable vbus on removal
If we enabled vbus, we need to balance that with a disable.
Signed-off-by: Sean Anderson <sean.anderson@...o.com>
---
(no changes since v1)
drivers/usb/phy/phy-generic.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index 2c2553bc9b54..9fc3312d614a 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -328,6 +328,9 @@ static int usb_phy_generic_remove(struct platform_device *pdev)
usb_remove_phy(&nop->phy);
+ if (nop->vbus_draw && nop->vbus_draw_enabled)
+ regulator_disable(nop->vbus_draw);
+
return 0;
}
--
2.35.1.1320.gc452695387.dirty
Powered by blists - more mailing lists