Explorar o código

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>
Hans de Goede %!s(int64=9) %!d(string=hai) anos
pai
achega
91d6e3b6bc
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      drivers/phy/phy-sun4i-usb.c

+ 3 - 1
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)