[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240123225111.1629405-5-sean.anderson@seco.com>
Date: Tue, 23 Jan 2024 17:51:11 -0500
From: Sean Anderson <sean.anderson@...o.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org
Cc: Robert Jarzmik <robert.jarzmik@...e.fr>,
Felipe Balbi <balbi@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Jonathan Hunter <jonathanh@...dia.com>,
Mike Looijmans <mike.looijmans@...ic.nl>,
Jules Maselbas <jmaselbas@...ray.eu>,
linux-kernel@...r.kernel.org,
Sean Anderson <sean.anderson@...o.com>
Subject: [PATCH v3 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 f7db24b5ed5c..8f735a86cd19 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -337,6 +337,9 @@ static void usb_phy_generic_remove(struct platform_device *pdev)
struct usb_phy_generic *nop = platform_get_drvdata(pdev);
usb_remove_phy(&nop->phy);
+
+ if (nop->vbus_draw && nop->vbus_draw_enabled)
+ regulator_disable(nop->vbus_draw);
}
static const struct of_device_id nop_xceiv_dt_ids[] = {
--
2.35.1.1320.gc452695387.dirty
Powered by blists - more mailing lists