mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
usb: dwc2: notify the usb role to usb2 phy
Notify the usb role to usb2 phy when we received role_switch set from the TCPM (Type-C Port Manager) to escape BC1.2 charge detection at host mode in usb2 phy driver. Signed-off-by: Frank Wang <frank.wang@rock-chips.com> Change-Id: Id41df3d25b29771d4461cfd1106ca3f3c2572a18
This commit is contained in:
@@ -117,6 +117,14 @@ static int dwc2_drd_role_sw_set(struct usb_role_switch *sw, enum usb_role role)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Notify the usb role to usb phy when we received role_switch set
|
||||
* from the TCPM (Type-C Port Manager) to escape BC1.2 charge detection
|
||||
* at host mode in usb phy driver.
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_ARCH_ROCKCHIP))
|
||||
phy_set_mode_ext(hsotg->phy, PHY_MODE_USB_OTG, role);
|
||||
|
||||
spin_lock_irqsave(&hsotg->lock, flags);
|
||||
|
||||
if (role == USB_ROLE_NONE) {
|
||||
|
||||
Reference in New Issue
Block a user