All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] sunxi: musb: Return early on VBUS GPIO error instead of on a positive value
@ 2015-03-15 17:27 Paul Kocialkowski
  2015-03-15 17:27 ` [U-Boot] [PATCH 2/4] sunxi: Avoid any assumption between musb gadget and host but fallback to host Paul Kocialkowski
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Paul Kocialkowski @ 2015-03-15 17:27 UTC (permalink / raw)
  To: u-boot

This allows printing the error message when VBUS is detected, as it would with
AXP VBUS detect.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
 drivers/usb/musb-new/sunxi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index 4d8c15a..90aaec6 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -261,7 +261,7 @@ static int sunxi_musb_init(struct musb *musb)
 			}
 
 			err = gpio_get_value(vbus_det);
-			if (err) {
+			if (err < 0) {
 				gpio_free(vbus_det);
 				return -EIO;
 			}
-- 
1.9.1

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

end of thread, other threads:[~2015-03-22 10:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-15 17:27 [U-Boot] [PATCH 1/4] sunxi: musb: Return early on VBUS GPIO error instead of on a positive value Paul Kocialkowski
2015-03-15 17:27 ` [U-Boot] [PATCH 2/4] sunxi: Avoid any assumption between musb gadget and host but fallback to host Paul Kocialkowski
2015-03-21 13:14   ` Hans de Goede
2015-03-22 10:54     ` Paul Kocialkowski
2015-03-15 17:27 ` [U-Boot] [PATCH 3/4] sunxi: common VBUS detection logic in usbc Paul Kocialkowski
2015-03-15 18:19   ` Marek Vasut
2015-03-15 21:54     ` Paul Kocialkowski
2015-03-15 23:31       ` Marek Vasut
2015-03-21 13:15   ` Hans de Goede
2015-03-15 17:27 ` [U-Boot] [PATCH 4/4] board: sunxi: USB download gadget cable detection Paul Kocialkowski
2015-03-21 12:56 ` [U-Boot] [PATCH 1/4] sunxi: musb: Return early on VBUS GPIO error instead of on a positive value Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.