sunxi: USB download gadget cable detection
authorPaul Kocialkowski <contact@paulk.fr>
Sun, 22 Mar 2015 17:07:13 +0000 (18:07 +0100)
committerHans de Goede <hdegoede@redhat.com>
Wed, 15 Apr 2015 14:17:17 +0000 (16:17 +0200)
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
board/sunxi/board.c

index 808bf82..3b419b3 100644 (file)
@@ -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)
 {