summary refs log tree commit diff
path: root/drivers/phy
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2016-09-07 22:20:41 +0200
committerKishon Vijay Abraham I <kishon@ti.com>2016-09-10 17:15:19 +0530
commit91d6e3b6bcf2625a07fec22a9af37ddbfd91a0df (patch)
treef91e5914a309d76782c443124bd70520881550e7 /drivers/phy
parent6ba43c2919613dad1a880fcab19cda1d68a5ce3d (diff)
downloadlinux-91d6e3b6bcf2625a07fec22a9af37ddbfd91a0df.tar.gz
phy-sun4i-usb: Warn when external vbus is detected
Warn when external vbus is detected when we're trying to enable our
own vbus.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/phy-sun4i-usb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
index af42f8d40ac1..03f030b491d6 100644
--- a/drivers/phy/phy-sun4i-usb.c
+++ b/drivers/phy/phy-sun4i-usb.c
@@ -390,8 +390,10 @@ static int sun4i_usb_phy_power_on(struct phy *_phy)
 
 	/* For phy0 only turn on Vbus if we don't have an ext. Vbus */
 	if (phy->index == 0 && sun4i_usb_phy0_have_vbus_det(data) &&
-				data->vbus_det)
+				data->vbus_det) {
+		dev_warn(&_phy->dev, "External vbus detected, not enabling our own vbus\n");
 		return 0;
+	}
 
 	ret = regulator_enable(phy->vbus);
 	if (ret)