From: Hans de Goede Date: Wed, 7 Sep 2016 20:20:41 +0000 (+0200) Subject: phy-sun4i-usb: Warn when external vbus is detected X-Git-Tag: v4.9-rc1~146^2~19^2^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=91d6e3b6bcf2625a07fec22a9af37ddbfd91a0df;p=karo-tx-linux.git 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 Signed-off-by: Kishon Vijay Abraham I --- 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)