diff options
author | INSUN PYO <insun.pyo@samsung.com> | 2019-09-11 16:49:44 +0900 |
---|---|---|
committer | INSUN PYO <insun.pyo@samsung.com> | 2019-09-16 11:25:38 +0900 |
commit | 6a8841e932a0fbd45963d8b9c9f3db7aee1c184e (patch) | |
tree | e9c9772b387b68b2265b0dbb3bddb79925d17816 | |
parent | b18fd68a6224ec1d00956cc07a96d6e19ee76850 (diff) | |
download | libdevice-node-6a8841e932a0fbd45963d8b9c9f3db7aee1c184e.tar.gz libdevice-node-6a8841e932a0fbd45963d8b9c9f3db7aee1c184e.tar.bz2 libdevice-node-6a8841e932a0fbd45963d8b9c9f3db7aee1c184e.zip |
usb_cfs_client: Enable gadget at reconfiguration #2submit/tizen/20191001.105102
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-x | hw/usb_cfs_client_common.c | 17 |
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); |