projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5628988
)
usb: phy: generic: Disable vbus on removal
author
Sean Anderson
<sean.anderson@seco.com>
Tue, 23 Jan 2024 22:51:11 +0000
(17:51 -0500)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sun, 28 Jan 2024 01:37:22 +0000
(17:37 -0800)
If we enabled vbus, we need to balance that with a disable.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Link:
https://lore.kernel.org/r/20240123225111.1629405-5-sean.anderson@seco.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/phy/phy-generic.c
patch
|
blob
|
history
diff --git
a/drivers/usb/phy/phy-generic.c
b/drivers/usb/phy/phy-generic.c
index f7db24b5ed5c0bab85ae31e19e2811a8f9f8960d..8f735a86cd197275480ef69145ef0dee9f739a27 100644
(file)
--- 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[] = {