Currently, the dp pullup will according to whether udc is available
to pullup up and the function driver's requirement, so, delete the
unconditional dp pullup operation at udc-core.

But we still need to pulldown up unconditionally when the gadget driver
is unloaded no matter the connection is there or not, so tell the
gadget driver do it.

Signed-off-by: Peter Chen <peter.c...@freescale.com>
---
 drivers/usb/gadget/udc/udc-core.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/udc-core.c 
b/drivers/usb/gadget/udc/udc-core.c
index fcb4686..2c0c55e1 100644
--- a/drivers/usb/gadget/udc/udc-core.c
+++ b/drivers/usb/gadget/udc/udc-core.c
@@ -459,9 +459,8 @@ static ssize_t usb_udc_softconn_store(struct device *dev,
 
        if (sysfs_streq(buf, "connect")) {
                usb_gadget_udc_start(udc->gadget, udc->driver);
-               usb_gadget_connect(udc->gadget);
        } else if (sysfs_streq(buf, "disconnect")) {
-               usb_gadget_disconnect(udc->gadget);
+               usb_udc_ready_to_connect(udc->driver, udc->gadget, false);
                usb_gadget_udc_stop(udc->gadget, udc->driver);
        } else {
                dev_err(dev, "unsupported command '%s'\n", buf);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to