Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-14 12:12:26 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-14 12:30:22 +0200
commitabcdcceb7539aa76f934279046547a441ebe5af1 (patch)
tree44c858d99f6ab010b43cfa2fc303d738b239db13
parentcc06b911485eef2cfb089c9e547240e71a4ad58e (diff)
phy: sun4i-usb: Make sure to disable PHY0 passby for peripheral
mode (bsc#1051510). suse-commit: e14e4201e313660eead6ed93daf65f766037f4aa
-rw-r--r--drivers/phy/allwinner/phy-sun4i-usb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index a8d465a52041..666d0cbda598 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -506,6 +506,7 @@ static void sun4i_usb_phy0_id_vbus_det_scan(struct work_struct *work)
struct sun4i_usb_phy_data *data =
container_of(work, struct sun4i_usb_phy_data, detect.work);
struct phy *phy0 = data->phys[0].phy;
+ struct sun4i_usb_phy *phy = phy_get_drvdata(phy0);
bool force_session_end, id_notify = false, vbus_notify = false;
int id_det, vbus_det;
@@ -562,6 +563,9 @@ static void sun4i_usb_phy0_id_vbus_det_scan(struct work_struct *work)
mutex_unlock(&phy0->mutex);
}
+ /* Enable PHY0 passby for host mode only. */
+ sun4i_usb_phy_passby(phy, !id_det);
+
/* Re-route PHY0 if necessary */
if (data->cfg->phy0_dual_route)
sun4i_usb_phy0_reroute(data, id_det);