diff options
author | Sean Anderson <sean.anderson@seco.com> | 2024-01-23 17:51:11 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-27 17:37:22 -0800 |
commit | 9f60a0cfa8fb8aa66262638771e9e9804efa490e (patch) | |
tree | de99db4b12ed24c4c647368ad9a119047e90fa2c /drivers/usb/phy | |
parent | 562898808cb17fdea92953e6a69c193b783d7b3f (diff) |
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@seco.com>
Link: https://lore.kernel.org/r/20240123225111.1629405-5-sean.anderson@seco.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/phy')
-rw-r--r-- | drivers/usb/phy/phy-generic.c | 3 |
1 files changed, 3 insertions, 0 deletions
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[] = { |