Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4032683ybg; Fri, 25 Oct 2019 12:21:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhxvrhXtSq8814wH2x6iwRI9NvsN6+EQg2+migmFD3Aj9PIEpAsGYi5cimP9lGOlVfKuE5 X-Received: by 2002:a05:6402:105a:: with SMTP id e26mr5686122edu.229.1572031273563; Fri, 25 Oct 2019 12:21:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1572031273; cv=pass; d=google.com; s=arc-20160816; b=ullqFfZPg+8YeEqZ9gaU6bdvm6xg6zisS+Ss29gEr/w2+KZ5j5xoz5NwKVYRch0oo5 HfkqxW9hRR/oY3sj+R1FMfwS4xAE/LQFqijFZ9yAnszUdf0zm4aANsVc7b5FSCjgo3Gw JcXW78cpyn/KwayOgFNjHztYi7ONelQeOWTXB1yv6MOUK8KWZtUbdd8gNNvA4XIRyXUA vK5rQPXmmeiUPj2wopVhMik/h9xjSPpcgk95CoMKec1vCY9kBfusZgQDyzw/SbYCbeqW T03bjUsQwVCVtWjAiMjPCsLmiBcmFbEEoOLGb/5KCM8FmnO5kz46nM67evHt6/tTRPF1 RnUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=grUJUlgj5/Db6iMX81Vp7dEE8np1Pq+4rlUmyolSJcs=; b=tf7HrhtAvtxRk/PwREWI85qKeMvEaht2Ws7GlpmUI5W8uTH9GD7Q1abk0C+4DZXNtx b/poHajn+o70ktBzl/5ONyxDE/sGxq3g3OtEDStUiizjavg+i8R1tCm6Ect0mDgcfG6F BYF/EWhrI1F7tpHYBnm5u13dD4KHnTG8YsrGWXHKku6e3Mur+BOb0d09yHI2S/kxDqBS 6benPvglfbqTo4ECycumoTnMCwna0DbnptT0x3FuQsQ+T4zpd1higPhzPfYPQMvrmBlK Jtc/3T5xFMDuxaD62+3Zn1X6tE7NXW9WdWb+pT1UMgk/gomuS1GGVPuH85sqqzfrZPfL l8tw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=U61crKF3; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r4si1843477ejz.77.2019.10.25.12.20.50; Fri, 25 Oct 2019 12:21: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=pass header.i=@nxp.com header.s=selector2 header.b=U61crKF3; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392044AbfJYDN7 (ORCPT + 99 others); Thu, 24 Oct 2019 23:13:59 -0400 Received: from mail-eopbgr80052.outbound.protection.outlook.com ([40.107.8.52]:4434 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391987AbfJYDN7 (ORCPT ); Thu, 24 Oct 2019 23:13:59 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iuiDbnTlplcEAsL/+Cqwm9VTRsG1jzmQlu7CcM6vVnB/SRxMz5MlieibXv/w3BSY7oqBhndkjWpxrG9SZ4zNs96VKmZR6UIlO7omjJOltn/5yZHPJqv8rwI4LzlgdFDZKLa4y6VOz6wpefuKwUQ6hJqdnGYTNTPCrjEjXooYW0XcrUrRvRsRDu03R3WDrcYkSCGaXVEvoAoAx+iTv+7BlCDLaeMZq+B3+cc5n3jSkmvt3DjS31NTGevoRM4woNt6KEq4iNnZpHL37lFe1l+vFLK75W0UH44UJUa3ICewq6upqSQezB9vvjAqdL+wSCmDUmKbZ9FAVEE7Z685AQLXGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=grUJUlgj5/Db6iMX81Vp7dEE8np1Pq+4rlUmyolSJcs=; b=gPP6dC7BlfBZFF5ZsfhwFk+t9HeGKM8CczsbJz1eGP1Etz2fm2rOvqcdAf1HI3qfTbA+noenbL6vlZTVbDRN2wIn+E/ZnoeamkZrkNvWDiJVSlhTipHE6qW1PuvDl85zCcoDLBcTBe3DRHnvRv3dHpkkd9p8bcNeQnI5FJSvDlQkBfhZhg4X+xZVTYPMlLjf4JUsnfYEo2989XLDgnFu5Nxa8LDxoZeqZ69/nWrFq1hlkDK9f0SrHHXbsHb5d/kJVtZ2gMz3Hf9u/4P1eYlPTh+MTmahOjAPOX7XTP61dIz7ne3gTzrzOQMMF+NlvHCwbsPFzIgpTWAGpk1iHg3b9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=grUJUlgj5/Db6iMX81Vp7dEE8np1Pq+4rlUmyolSJcs=; b=U61crKF3vRsvDUzEtN4waZwQNzANd/oNL4IdFqAimnlPU1bKEU3GghsyaFnB+KCGfcvfddvGYmK8I3Tsb6q4/V3eB5PYwU12VtOD9qKf2CF+AFWj5Ynjz1Kp6X/qf1m4TyXtE/bFU2tHfbToQZ8pysydGK/zV5RsyfMIUyXhcPA= Received: from VI1PR04MB5327.eurprd04.prod.outlook.com (20.177.51.23) by VI1PR04MB3966.eurprd04.prod.outlook.com (10.171.183.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.20; Fri, 25 Oct 2019 03:13:55 +0000 Received: from VI1PR04MB5327.eurprd04.prod.outlook.com ([fe80::68e3:e1a6:78fd:7133]) by VI1PR04MB5327.eurprd04.prod.outlook.com ([fe80::68e3:e1a6:78fd:7133%3]) with mapi id 15.20.2387.023; Fri, 25 Oct 2019 03:13:54 +0000 From: Peter Chen To: Pawel Laszczak CC: Roger Quadros , "felipe.balbi@linux.intel.com" , "gregkh@linuxfoundation.org" , "nsekhar@ti.com" , Rahul Kumar , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] usb: cdns3: gadget: Don't manage pullups Thread-Topic: [PATCH] usb: cdns3: gadget: Don't manage pullups Thread-Index: AQHViYCigHhLS+QXN0CJz1D+9q4PbKdn8nSAgAK+9IA= Date: Fri, 25 Oct 2019 03:13:54 +0000 Message-ID: <20191025031343.GA13392@b29397-desktop> References: <20191023090232.27237-1-rogerq@ti.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=peter.chen@nxp.com; x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 6887b738-7b52-4303-e213-08d758f95e5e x-ms-traffictypediagnostic: VI1PR04MB3966: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 02015246A9 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(7916004)(136003)(366004)(39860400002)(376002)(346002)(396003)(199004)(189003)(476003)(66946007)(66556008)(66476007)(66446008)(76116006)(446003)(64756008)(91956017)(33716001)(2906002)(486006)(7736002)(6512007)(11346002)(316002)(14454004)(6486002)(3846002)(6116002)(33656002)(25786009)(44832011)(9686003)(229853002)(305945005)(54906003)(6916009)(81166006)(8936002)(8676002)(478600001)(4326008)(81156014)(102836004)(86362001)(6246003)(99286004)(76176011)(66574012)(1076003)(186003)(5660300002)(66066001)(14444005)(6506007)(53546011)(6436002)(256004)(26005)(71190400001)(71200400001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB3966;H:VI1PR04MB5327.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +h9yFB4wPPT7tnIidnyi6DPLbw4EBu4RTtUrtbdBKhxqhhLyAJVvjHiCSb5zSA1r191KvrE1EMecZ8PlSxk3bHZhlr9vKDDooHBlMuRtiv0NoZBUpcjOePU276qh8viOTkMQcKT3BmLRp4AEFHsUNsLyETM/ygM/BmYsvBcuhCCNQpu9HPICLtn46qx0iOosVkhTmeGUumzYHwxuplRj2qtuwJZjUKTnGsyNvjpyZm8o3ciOYkiqWee59OoAr8Lm/NklkC8C2xPJ3RpIwptDdCV7UWBxdjHyl+k2UbJWgiI6RBIPcrS9xNZudXUvjOuEmSmgbYbObGH29rHLrIn1G9Td9sNKro0BnnlgTXR1o8hh57pS5U8s68muJ0zdyuEc4v8KXSAzPvWFuAD1T9V9pF2RiRvGjvAonnrcqpS1UKiKybkLJf4jyHavPZwsyBbA x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6887b738-7b52-4303-e213-08d758f95e5e X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Oct 2019 03:13:54.7863 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ZHAKWQwZsGeNQMhxggBz8NfzxjcdI2/PKqTIaHVLAnlrxfJ/9PrOBfYf/EWejBFL4v1jPNIuPWuvMiQZA5rzig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3966 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-10-23 09:17:45, Pawel Laszczak wrote: > Hi, >=20 > Reviewed-by: Pawel Laszczak Hi Roger & Pawel, Assume gadget function has already enabled, if you switch host mode to device mode, with your changes, where the device mode will be enabled again? Peter >=20 > Regards,=20 > Pawel,=20 >=20 > >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(-) > > > >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_devic= e *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; > > } > > > >-- > >Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. > >Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki >=20 --=20 Thanks, Peter Chen=