From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70169C433E0 for ; Tue, 29 Dec 2020 10:17:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 20DA4207BC for ; Tue, 29 Dec 2020 10:17:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726014AbgL2KQ4 (ORCPT ); Tue, 29 Dec 2020 05:16:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:52360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbgL2KQz (ORCPT ); Tue, 29 Dec 2020 05:16:55 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 322ED207BC; Tue, 29 Dec 2020 10:16:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609236974; bh=wUm/zzedT7r+fNRkot4idMV+kPkdHVUgjB5hzgCC4BA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wgc26PCNIKSJfE7e6A4JBNpkL2G2L1R8T73LGQRs+I8uYqYyAKx4pamG8wTsDl3ty CgcOmP0He8KFZYdBoq33TTmTM/ElHvYtftUOz4ZjWVgpGJ14vcXIQ9r7sD5yh+ITJj FfTqV4zTfiqHCcT2nJyxrkK++CJkwY7pVWJbN1A8= Date: Tue, 29 Dec 2020 11:17:34 +0100 From: Greg Kroah-Hartman To: Peter Chen Cc: balbi@kernel.org, USB list , linux-imx@nxp.com, Peter Chen Subject: Re: [PATCH RESEND 1/2] usb: gadget: core: change the comment for usb_gadget_connect Message-ID: References: <20201013092746.10602-1-peter.chen@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Tue, Dec 29, 2020 at 01:55:07PM +0800, Peter Chen wrote: > On Tue, Dec 1, 2020 at 2:46 PM Peter Chen wrote: > > > On Tue, Oct 13, 2020 at 8:01 PM Peter Chen wrote: > > > > > > The pullup does not need to be enabled at below situations: > > > - For platforms which the hardware pullup starts after setting > > > register even they do not see the VBUS. If the pullup is always > > > enabled for these platforms, it will consume more power and > > > break the USB IF compliance tests [1]. > > > - For platforms which need to do BC 1.2 charger detection after > > > seeing the VBUS. Pullup D+ will break the charger detection > > > flow. > > > - For platforms which the system suspend is allowed when the > > > connection with host is there but the bus is not at suspend. > > > For these platforms, it is better to disable pullup when > > > entering the system suspend otherwise the host may confuse > > > the device behavior after controller is in low power mode. > > > Disable pullup is considered as a disconnection event from > > > host side. > > > > > > [1] USB-IF Full and Low Speed Compliance Test Procedure > > > F Back-voltage Testing > > > Section 7.2.1 of the USB specification requires that no device > > > shall supply (source) current on VBUS at its upstream facing > > > port at any time. From VBUS on its upstream facing port, > > > a device may only draw (sink) current. They may not provide power > > > to the pull-up resistor on D+/D- unless VBUS is present (see > > > Section 7.1.5). > > > > > > Signed-off-by: Peter Chen > > > --- > > > drivers/usb/gadget/udc/core.c | 3 +-- > > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > > > diff --git a/drivers/usb/gadget/udc/core.c > > b/drivers/usb/gadget/udc/core.c > > > index debf54205d22..215ecbe8b692 100644 > > > --- a/drivers/usb/gadget/udc/core.c > > > +++ b/drivers/usb/gadget/udc/core.c > > > @@ -659,8 +659,7 @@ EXPORT_SYMBOL_GPL(usb_gadget_vbus_disconnect); > > > * > > > * Enables the D+ (or potentially D-) pullup. The host will start > > > * enumerating this gadget when the pullup is active and a VBUS session > > > - * is active (the link is powered). This pullup is always enabled > > unless > > > - * usb_gadget_disconnect() has been used to disable it. > > > + * is active (the link is powered). > > > * > > > * Returns zero on success, else negative errno. > > > */ > > > -- > > > 2.17.1 > > > > > > > Ping... > > > > Peter > > > > Greg, would you please help to catch it up? Can you resend the patches please? Digging it out from a response like this is a bit difficult :) thanks, greg k-h