mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
usb: dwc3: rockchip: set phy mode when change dr_mode
In the case u2phy control vbus, the driver of usb controller must control the vbus through the interface of u2phy, this patch change the mode of u2phy when change dr_mode. Change-Id: I8447bffc55e3502bf53a2e8af841a74914571781 Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
This commit is contained in:
@@ -142,6 +142,8 @@ static ssize_t dwc3_rockchip_force_mode_write(struct file *file,
|
||||
flush_work(&rockchip->otg_work);
|
||||
if (dwc->dr_mode == USB_DR_MODE_PERIPHERAL)
|
||||
phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_DEVICE);
|
||||
else if (dwc->dr_mode == USB_DR_MODE_HOST)
|
||||
phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_HOST);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user