[U-Boot] [PATCH v2 6/7] sunxi: USB download gadget cable detection

Paul Kocialkowski contact at paulk.fr
Sun Mar 22 18:07:13 CET 2015


Signed-off-by: Paul Kocialkowski <contact at paulk.fr>
---
 board/sunxi/board.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index e1891d1..becdc8b 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -241,6 +241,13 @@ static struct musb_hdrc_platform_data musb_plat = {
 };
 #endif
 
+#ifdef CONFIG_USB_GADGET
+int g_dnl_board_usb_cable_connected(void)
+{
+	return sunxi_usbc_vbus_detect(0);
+}
+#endif
+
 #ifdef CONFIG_MISC_INIT_R
 int misc_init_r(void)
 {
-- 
1.9.1



More information about the U-Boot mailing list