mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
phy: rockchip-inno-usb2: add vbus control when set phy mode
The vbus may need control by u2phy when force. This patch control vbus when set phy mode. Change-Id: I237e9e3688b257689c79040f19642cea5365d409 Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
This commit is contained in:
@@ -754,9 +754,13 @@ static int rockchip_usb2phy_set_mode(struct phy *phy, enum phy_mode mode)
|
||||
* fallthrough
|
||||
*/
|
||||
case PHY_MODE_USB_DEVICE:
|
||||
gpiod_set_value_cansleep(rport->vbus_drv_gpio, 0);
|
||||
extcon_set_state_sync(rphy->edev, EXTCON_USB_VBUS_EN, false);
|
||||
vbus_det_en = true;
|
||||
break;
|
||||
case PHY_MODE_USB_HOST:
|
||||
gpiod_set_value_cansleep(rport->vbus_drv_gpio, 1);
|
||||
extcon_set_state_sync(rphy->edev, EXTCON_USB_VBUS_EN, true);
|
||||
/* fallthrough */
|
||||
case PHY_MODE_INVALID:
|
||||
vbus_det_en = false;
|
||||
|
||||
Reference in New Issue
Block a user