From: Paweł Szewczyk
Date: Tue, 10 Apr 2018 14:56:20 +0000 (+0200)
Subject: usb_cfs_client: Enable gadget at reconfiguration
X-Git-Tag: accepted/tizen/unified/20180412.073814^0
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6116158ef7ae3dad4b41976aff87c5c73bdbd15;p=platform%2Fadaptation%2Fsamsung_exynos%2Fdevice-manager-plugin-artik.git
usb_cfs_client: Enable gadget at reconfiguration
Extcon support for artik is bound to the gadget, so we need to need to
enable it to start monitoring usb connection. This does not do much
harm, but can cause some functionfs daemons to run long before they are
actually needed.
Change-Id: I7a5eaacaa476539a7cf1c237f811163be4d9b7d5
Signed-off-by: Paweł Szewczyk
---
diff --git a/hw/usb_cfs_client/usb_cfs_client.c b/hw/usb_cfs_client/usb_cfs_client.c
index dc09f21..c7875a4 100644
--- a/hw/usb_cfs_client/usb_cfs_client.c
+++ b/hw/usb_cfs_client/usb_cfs_client.c
@@ -949,6 +949,13 @@ static int cfs_reconfigure_gadget(struct usb_client *usb,
goto out;
}
+ /* Workaround for enabling extcon notification on artik */
+ ret = usbg_enable_gadget(cfs_client->gadget, cfs_client->udc);
+ if (ret) {
+ _E("Could not enable gadget");
+ goto out;
+ }
+
ret = cfs_cleanup_left_configs(cfs_client, i);
/* TODO