public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] sunxi: axp221: Use vbus-available rather then vbus-usable for vbus-detect
@ 2015-03-23 16:28 Hans de Goede
  2015-03-23 16:33 ` Paul Kocialkowski
  2015-03-23 16:34 ` Hans de Goede
  0 siblings, 2 replies; 8+ messages in thread
From: Hans de Goede @ 2015-03-23 16:28 UTC (permalink / raw)
  To: u-boot

vbus-usable does not get set if power is provided through the power barrel
connector, even if external 5v is also present on the otg connector.

vbus-available correctly always reflects if there is 5v present on the otg
connector.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/power/axp221.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/axp221.c b/drivers/power/axp221.c
index f758a75..dc3a7f1 100644
--- a/drivers/power/axp221.c
+++ b/drivers/power/axp221.c
@@ -424,7 +424,7 @@ int axp_gpio_get_value(unsigned int pin)
 		if (ret)
 			return ret;
 
-		return !!(val & AXP221_POWER_STATUS_VBUS_USABLE);
+		return !!(val & AXP221_POWER_STATUS_VBUS_AVAIL);
 	default:
 		return -EINVAL;
 	}
-- 
2.3.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-03-28  8:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-23 16:28 [U-Boot] [PATCH] sunxi: axp221: Use vbus-available rather then vbus-usable for vbus-detect Hans de Goede
2015-03-23 16:33 ` Paul Kocialkowski
2015-03-23 16:38   ` Hans de Goede
2015-03-23 22:44     ` Paul Kocialkowski
2015-03-27 20:37     ` Hans de Goede
2015-03-28  8:27       ` Paul Kocialkowski
2015-03-23 16:34 ` Hans de Goede
2015-03-23 16:46   ` Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox