Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1205229 > unrolled thread

[PATCH 16/19] phy-sun4i-usb: Only check vbus-det on power-on on boards with vbus-det

Started byKishon Vijay Abraham I <kishon@ti.com>
First post2015-08-11 18:00 +0200
Last post2015-08-11 18:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 16/19] phy-sun4i-usb: Only check vbus-det on power-on on boards with vbus-det Kishon Vijay Abraham I <kishon@ti.com> - 2015-08-11 18:00 +0200

#1205229 — [PATCH 16/19] phy-sun4i-usb: Only check vbus-det on power-on on boards with vbus-det

FromKishon Vijay Abraham I <kishon@ti.com>
Date2015-08-11 18:00 +0200
Subject[PATCH 16/19] phy-sun4i-usb: Only check vbus-det on power-on on boards with vbus-det
Message-ID<pWk82-1c5-11@gated-at.bofh.it>
From: Hans de Goede <hdegoede@redhat.com>

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>
---
 drivers/phy/phy-sun4i-usb.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
index 27ae89e..e2eb688d 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);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web