From patchwork Wed Oct 23 09:02:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 177251 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp427677ill; Wed, 23 Oct 2019 02:02:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDfv8v5QOkC7++fdhC9MmEILhleLRsvjTsrIzY9SG0pivdKVacCujhRaF/1dpZhKnFXKI4 X-Received: by 2002:a17:906:2d49:: with SMTP id e9mr349742eji.240.1571821369034; Wed, 23 Oct 2019 02:02:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571821369; cv=none; d=google.com; s=arc-20160816; b=Gh+qtHEsWccsfJDbDNR07H5ht7H8BwBQ3dPR4AxqLOcBvSOCFNbpojaoxLcqZXGBnB fOO9ssjP/kt7V3jKR8TZAZSP5KUtILfY4hhIbrv8E5cnHSZ3q6Uqoi5ee+6bbYKmIP04 za5d+8+JF8ROx3LolPoXbIY3KJ701Gtd6fP9iXbs82oo18dlOesLDfhiWYzwXOWtXhKy pCXFd4Pa74rQF7FLEoLWlAuO/ovvNPpUVb0PgnpSpgsOZ6gKvnCTzfCMsjT06E28l31W 2JUs8Rv8qBqH+nx30pmD+qurBE4b1ukrtOGJ1bH7a3d3iOgPSb0Vi6kIJ3K3N0LxNCFb 8ECA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=vG+W4quqVd/rx5gPIFHyLx5O+cQx6BhNDY55hfW2vMM=; b=qtMPnVoburEXLx8xNZ+vtjPWSkms2EI2sfdGm/fTaWN4StOROh92kURZ8b1vnRUqRz pSRerlENXZyKtqczyx6mgxd1BEZKR2OLcfJqacgwygYk9XwDsTwqB0D+bmhxiJIs4uc6 28h8OemyXgTefxa8PVbyGBwll5VGsqeQBn2fMYe9VvMgWXBrkAPCLpXLlIbiqOC72y4r 3QlkKNkQ6cWaqFctqbz6xcSLeoV3uJza41te8HwOna0Z9L8rBB4hDAhm0ee1AUy/2dM5 iD8CdJCDAnL5n2B7S/hn5VTTY8b5iBOOwbKWMiu0P4gwCE9YtK3Dp8mquidERJY74Ccf yb/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=awNAdFys; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m27si6302484ejd.0.2019.10.23.02.02.48; Wed, 23 Oct 2019 02:02:49 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=awNAdFys; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390693AbfJWJCq (ORCPT + 26 others); Wed, 23 Oct 2019 05:02:46 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:46780 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390590AbfJWJCp (ORCPT ); Wed, 23 Oct 2019 05:02:45 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9N92cQT040531; Wed, 23 Oct 2019 04:02:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571821358; bh=vG+W4quqVd/rx5gPIFHyLx5O+cQx6BhNDY55hfW2vMM=; h=From:To:CC:Subject:Date; b=awNAdFysYIKsbC0K9Fa3reRPmlnmx4B27vKWMvmYPhzlbLokot9WQ63nJ0ePKbaoT DLDi792xpdzOmfU3VGNIllg3YjA2VIYXKtAW61a2ERRm+UQFuzhd1UloyDE2cMpiQV hicEgt9Gh2Z0fTFdnRwMHdp1SASYvToF9IEqcnfg= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9N92c1d021864; Wed, 23 Oct 2019 04:02:38 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 23 Oct 2019 04:02:27 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 23 Oct 2019 04:02:37 -0500 Received: from lta0400828a.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9N92Ynk085549; Wed, 23 Oct 2019 04:02:34 -0500 From: Roger Quadros To: , CC: , , , , , , Roger Quadros Subject: [PATCH] usb: cdns3: gadget: Don't manage pullups Date: Wed, 23 Oct 2019 12:02:32 +0300 Message-ID: <20191023090232.27237-1-rogerq@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The USB gadget core is supposed to manage pullups of the controller. Don't manage pullups from within the controller driver. Otherwise, function drivers are not able to keep the controller disconnected from the bus till they are ready. (e.g. g_webcam) Signed-off-by: Roger Quadros --- Hi Greg/Felipe, This can be used for -rc as it is a bug fix. cheers, -roger drivers/usb/cdns3/gadget.c | 4 ---- 1 file changed, 4 deletions(-) -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki Reviewed-by: Pawel Laszczak diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index 2ca280f4c054..714382d96055 100644 --- a/drivers/usb/cdns3/gadget.c +++ b/drivers/usb/cdns3/gadget.c @@ -2324,8 +2324,6 @@ static void cdns3_gadget_config(struct cdns3_device *priv_dev) writel(USB_CONF_CLK2OFFDS | USB_CONF_L1DS, ®s->usb_conf); cdns3_configure_dmult(priv_dev, NULL); - - cdns3_gadget_pullup(&priv_dev->gadget, 1); } /** @@ -2708,8 +2706,6 @@ static int cdns3_gadget_suspend(struct cdns3 *cdns, bool do_wakeup) /* disable interrupt for device */ writel(0, &priv_dev->regs->usb_ien); - cdns3_gadget_pullup(&priv_dev->gadget, 0); - return 0; }