hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/phy/rockchip/phy-rockchip-naneng-usb2.c
....@@ -1755,6 +1755,10 @@
17551755 if (rphy->phy_cfg->phy_lowpower)
17561756 ret = rphy->phy_cfg->phy_lowpower(rphy, true);
17571757
1758
+ /* Set gpio output low to avoid leakage */
1759
+ if (rphy->vup_gpio && !wakeup_enable)
1760
+ gpiod_set_value(rphy->vup_gpio, 1);
1761
+
17581762 return ret;
17591763 }
17601764
....@@ -1770,6 +1774,10 @@
17701774 if (device_may_wakeup(rphy->dev))
17711775 wakeup_enable = true;
17721776
1777
+ /* Set gpio output high to disable pull-up circuit on DM */
1778
+ if (rphy->vup_gpio && !wakeup_enable)
1779
+ gpiod_set_value(rphy->vup_gpio, 0);
1780
+
17731781 /* exit low power state */
17741782 if (rphy->phy_cfg->phy_lowpower)
17751783 ret = rphy->phy_cfg->phy_lowpower(rphy, false);