Remove workaround code that it makes usb work in Artik 78/225578/3 accepted/tizen/unified/20200224.081513 submit/tizen/20200221.073300
authorINSUN PYO <insun.pyo@samsung.com>
Fri, 21 Feb 2020 05:04:52 +0000 (14:04 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Fri, 21 Feb 2020 05:46:47 +0000 (14:46 +0900)
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

index e4572de..d594fd2 100644 (file)
@@ -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