[U-Boot] [PATCH 4/4] board: sunxi: USB download gadget cable detection

Paul Kocialkowski contact at paulk.fr
Sun Mar 15 18:27:47 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