usb_cfs_client: Enable gadget at reconfiguration 79/175579/1 accepted/tizen/unified/20180412.073814 submit/tizen/20180411.015824
authorPaweł Szewczyk <p.szewczyk@samsung.com>
Tue, 10 Apr 2018 14:56:20 +0000 (16:56 +0200)
committerPaweł Szewczyk <p.szewczyk@samsung.com>
Tue, 10 Apr 2018 15:12:59 +0000 (17:12 +0200)
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 <p.szewczyk@samsung.com>
hw/usb_cfs_client/usb_cfs_client.c

index dc09f21..c7875a4 100644 (file)
@@ -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