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
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