From: Paweł Szewczyk Date: Fri, 29 Jun 2018 13:37:59 +0000 (+0200) Subject: usb_cfs_client: Enable gadget at reconfiguration X-Git-Tag: submit/tizen/20180706.105024~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3464706cec50ca4cc07da0708064874fca775f35;p=platform%2Fcore%2Fsystem%2Flibdevice-node.git usb_cfs_client: Enable gadget at reconfiguration This workaround was introduced on artik, where gadget need to be enabled before usb connection can be properly monitored. As this does little harm, it's moved here to prevent regression on artik. The side effect of this is starting some functionfs daemons long before they are actually needed, so this should be removed when exton issue is fixed. Change-Id: Ia41c21e3c44d7d3a00d557f181e8c22766c6f31b Signed-off-by: Paweł Szewczyk --- diff --git a/hw/usb_cfs_client_common.c b/hw/usb_cfs_client_common.c index 5e043cc..c133aff 100644 --- a/hw/usb_cfs_client_common.c +++ b/hw/usb_cfs_client_common.c @@ -806,6 +806,11 @@ static int cfs_reconfigure_gadget(struct usb_client *usb, goto out; } + /* Workaround for enabling extcon notification */ + ret = usbg_enable_gadget(cfs_client->gadget, cfs_client->udc); + if (ret) + goto out; + ret = cfs_cleanup_left_configs(cfs_client, i); /* TODO