lkml.org 
[lkml]   [2022]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/4] usb: phy: generic: Disable vbus on removal
Date
If we enabled vbus, we need to balance that with a disable.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---

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.25.1
\
 
 \ /
  Last update: 2022-01-14 18:11    [W:0.070 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site