From f68550cd0c83a60621de5ef70de2a9edcba8b5d7 Mon Sep 17 00:00:00 2001 From: INSUN PYO Date: Fri, 21 Feb 2020 14:04:52 +0900 Subject: [PATCH] Remove workaround code that it makes usb work in Artik Excon does not work perfectly in Artik. So I added the workaround code, which causes some strange USB initialization. This problem disappears when the extcon value is always fixed at 1. So I asked the kernel team to fix the extcon value to 1 and removed the workaround code. If extcon is always 1, deviecd will not recognize when usb is disconnected, but it will work normally. Conclusion: For targets where extcon does not work perfectly, deviced do not support usb connect/disconnect. Change-Id: Idf06c987f589218a458df6904d8fb8f9132f05c3 --- hw/usb_cfs_client_common.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/hw/usb_cfs_client_common.c b/hw/usb_cfs_client_common.c index e4572de..d594fd2 100644 --- a/hw/usb_cfs_client_common.c +++ b/hw/usb_cfs_client_common.c @@ -826,22 +826,6 @@ static int cfs_reconfigure_gadget(struct usb_client *usb, goto out; } - /* Workaround for enabling extcon notification */ - /* ******************************************* */ - /* ******************************************* */ - { - const char *ARTIK_UDC_NAME = "c0040000.dwc2otg"; - const char *udc_name = usbg_get_udc_name(cfs_client->udc); - if (udc_name && !strncmp(udc_name, ARTIK_UDC_NAME, strlen(ARTIK_UDC_NAME))) { - ret = usbg_enable_gadget(cfs_client->gadget, cfs_client->udc); - if (ret) - goto out; - } - } - /* ******************************************* */ - /* ******************************************* */ - /* ******************************************* */ - ret = cfs_cleanup_left_configs(cfs_client, i); /* TODO -- 2.34.1