Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1023952yba; Thu, 4 Apr 2019 02:40:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDwIC3r3RscZoXAbV1i7nuCqBnxwPpVXHFhyZM88r/z0Ydi9eGBctexFBpH481KuSsu4Xy X-Received: by 2002:a17:902:6b08:: with SMTP id o8mr5432743plk.105.1554370813401; Thu, 04 Apr 2019 02:40:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554370813; cv=none; d=google.com; s=arc-20160816; b=LbPJ5qPDedoLBEBenZ0n/KjpsXc5qc4zH177VAQWkA7t4hmG8nNM7xuGyJTnIP73CR brmrz1EGM6+/vxMg/h+esHeW+dONlfh9lqGDA3A9nL2kVT1OvM8cvvPpubMxsy1RgE7i zSZhZ1upXzwvjxPJ2dBqpu67R5854X+wETLcq9deEWE3/gL7l651zZrSsg0G1763+jZb wRNqoJLJSdLUjG6HANwmg6/auB8mskFAdp80UwpMW5CbsMkXHYgw8+8n71yLTgl/PQud uzCBY5Js+/y7YQteLjj0+UrSpsJkKWTnTdR0qCoHqmei2ujbvUzFHK4LUnCp76SxIwY4 bFKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=F5VToilLnMBME9L+TXy2uaYnd9STb1aEJYklDsxqWuQ=; b=lrIB7A7JEMuqzZgLH7WhdHuCY3l8K4bgpa/KIxgo7jm+9XBELaUtq4xAp46sBvVs+s C25kKs6t30Dv5BhKaYzyRBwJJ3LlXoR0/oGFRSALrhLSQVlj+D00fSg8ofGHSrYxzj0D ixLs0g+r3WKO75F8zpNca8uEwFmR9cuWSySSZsGESP/0k5XDHL5GFvn0/xWvCWt65XQV 8ccIjlYrjFEZWwKXmbblVe5Bs1HgsqWvQvD6pbJSqUkkb8FY2VlQxVphkV1cVf/io2Rp XHsgfj8jZghSaykhqAGGQWVnG+aivlhZ1J7BeGshg6t9jT3+2/JE91XivOO7TaaqLCyF J01w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=QRoB0vcM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n12si16029112pgm.191.2019.04.04.02.39.58; Thu, 04 Apr 2019 02:40:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=QRoB0vcM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732441AbfDDJh4 (ORCPT + 99 others); Thu, 4 Apr 2019 05:37:56 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:58190 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730726AbfDDJhy (ORCPT ); Thu, 4 Apr 2019 05:37:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1554370670; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=F5VToilLnMBME9L+TXy2uaYnd9STb1aEJYklDsxqWuQ=; b=QRoB0vcM9gcLxl3Uf7c5RHDTeJTflknGkL7a27BdL6DxyUKMmsxbUiREfovQ0IkMfYIkEx QBXDb9EhacgyA0xz2tislqRLgK632OO/+24rhnmHDoiYKgAfd6QZTvkFMwLO4LKKu06JWe LlxEVLSuspXuHt3iWm1vIqwHIV2PFFM= From: Paul Cercueil To: Bin Liu Cc: od@zcrc.me, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH] usb: musb: Disable pullup in gadget setup Date: Thu, 4 Apr 2019 11:37:43 +0200 Message-Id: <20190404093743.6470-1-paul@crapouillou.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The pullup may be already enabled before the driver is initialized. It has to be disabled at init time, as we cannot guarantee that a gadget driver will be bound to the UDC. Signed-off-by: Paul Cercueil --- drivers/usb/musb/musb_gadget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index ffe462a657b1..094dc59c834c 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1794,6 +1794,7 @@ int musb_gadget_setup(struct musb *musb) musb->is_active = 0; musb_platform_try_idle(musb, 0); + musb_pullup(musb, 0); status = usb_add_gadget_udc(musb->controller, &musb->g); if (status) -- 2.11.0