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>
This commit is contained in:
Sean Anderson 2024-01-23 17:51:11 -05:00 committed by Greg Kroah-Hartman
parent 562898808c
commit 9f60a0cfa8

View File

@ -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[] = {