summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINSUN PYO <insun.pyo@samsung.com>2019-09-11 07:49:44 (GMT)
committerINSUN PYO <insun.pyo@samsung.com>2019-09-16 02:25:38 (GMT)
commit6a8841e932a0fbd45963d8b9c9f3db7aee1c184e (patch)
treee9c9772b387b68b2265b0dbb3bddb79925d17816
parentb18fd68a6224ec1d00956cc07a96d6e19ee76850 (diff)
downloadlibdevice-node-6a8841e932a0fbd45963d8b9c9f3db7aee1c184e.zip
libdevice-node-6a8841e932a0fbd45963d8b9c9f3db7aee1c184e.tar.gz
libdevice-node-6a8841e932a0fbd45963d8b9c9f3db7aee1c184e.tar.bz2
usb_cfs_client: Enable gadget at reconfiguration #2submit/tizen/20191001.105102refs/changes/59/213859/1
Because it is a workround code for Artik, restrict this patch to artik. (This workaround will be removed in tizen 6.0) Change-Id: Ice81dd8c37359bdc4a37099ecff27d696f7f9ec0 Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
-rwxr-xr-xhw/usb_cfs_client_common.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/hw/usb_cfs_client_common.c b/hw/usb_cfs_client_common.c
index b022bcf..5d0ea75 100755
--- a/hw/usb_cfs_client_common.c
+++ b/hw/usb_cfs_client_common.c
@@ -804,9 +804,20 @@ static int cfs_reconfigure_gadget(struct usb_client *usb,
}
/* Workaround for enabling extcon notification */
- ret = usbg_enable_gadget(cfs_client->gadget, cfs_client->udc);
- if (ret)
- goto out;
+ /* ******************************************* */
+ /* ******************************************* */
+ {
+ 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);