Remove workaround code that it makes usb work in Artik 11/225611/1 accepted/tizen/5.5/unified/20200224.123548 submit/tizen_5.5/20200221.073347
authorINSUN PYO <insun.pyo@samsung.com>
Fri, 21 Feb 2020 05:04:52 +0000 (14:04 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Fri, 21 Feb 2020 07:15:55 +0000 (07:15 +0000)
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
(cherry picked from commit f68550cd0c83a60621de5ef70de2a9edcba8b5d7)

hw/usb_cfs_client_common.c

index e4572dec067a2ee98bc09fe93ca68453df658e08..d594fd217b57cfa166b7eacb6f3544c2235b8e1a 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