diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-07-31 10:01:42 +0200 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2015-08-03 15:05:08 +0200 |
commit | 8083526e0585e23447ac9ea94ca3f6d32d6dee8f (patch) | |
tree | 86316ffa7ed3ccda7c4af974fe3ab7227d9c6fe2 /drivers/phy | |
parent | phy-sun4i-sub: Move vbus-detect helper functions up in the file (diff) | |
download | linux-8083526e0585e23447ac9ea94ca3f6d32d6dee8f.tar.xz linux-8083526e0585e23447ac9ea94ca3f6d32d6dee8f.zip |
phy-sun4i-usb: Only check vbus-det on power-on on boards with vbus-det
data->vbus_det is always 1 on boards without a (working) vbus-det, skip
the vbus_det test on such boards.
This fixes the sun4i usb phy code never turning on Vbus on such boards.
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c index 27ae89e0d3ca..e2eb688d82f5 100644 --- a/drivers/phy/phy-sun4i-usb.c +++ b/drivers/phy/phy-sun4i-usb.c @@ -328,7 +328,8 @@ static int sun4i_usb_phy_power_on(struct phy *_phy) return 0; /* For phy0 only turn on Vbus if we don't have an ext. Vbus */ - if (phy->index == 0 && data->vbus_det) + if (phy->index == 0 && sun4i_usb_phy0_have_vbus_det(data) && + data->vbus_det) return 0; ret = regulator_enable(phy->vbus); |