Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7173429pxb; Thu, 18 Feb 2021 03:31:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHIcwatdV1z/lQla5d5BMgzmUv49iM1E2RMF4W514JfJgOG78wGVeCGnsf5o3GaTjTxSOr X-Received: by 2002:a17:906:2ac1:: with SMTP id m1mr3519982eje.149.1613647874810; Thu, 18 Feb 2021 03:31:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613647874; cv=none; d=google.com; s=arc-20160816; b=dN5Mci2IubZd3Gg5l1mNauQhcHDvY5oUlpR9qZlQppKS2BFbB/Bq0MQ2Yg2F4rieLX 7AZmuclD/wpjuryleLBnrSlTVpRQrKlooCenrTmlt0BaMO4DM+Yu1pogj8phd01H229j X/u8tOMZ/l/rdP5ViPCLen57S0GJpe0ds4Ahm+V/cGdxNR0n8p7emJ9ifUq9bayEKkfJ 4rBHjHe9M496b5gZGB1P3p536g2EsFw7EITOXPkTe29pFNO7gwclTSrlCXG+WRSdl274 RxcsX9NSFQ8I6lJ6WTx4xt8+1CYGozR1xlTvz5jANQZ7wesn7QWg8eOhHxbs8pGl6bQ0 REcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mDJ5oAiIlOcd44AJIRv7H2hk0Xu0DDbka+pm6o8b85I=; b=MSKeM93gRH9gbKusjV16TKTWiUdO1XwStDdCioKlU5CBTv+K9PNEoW5vlppmMLoqV4 5j/zfYi4J0Ez1AEUeswqqSXdky22Ya/13RLUAdPwZZk1bdz2/bnxljNZn2V+ZheuHYyC 3q0nAywGiHN8YLWEq8ggQV4Uo+ZVrkQ6Zu+5CYTkl8Ca7mrdtfVH8nuIKC4xtJU06QJP yqUMBYok7ZM2MWY2zv7e/UZ4thUQuDkJeLJGzBoSzHsgi03sykq0IPv00YHYim8cMhNE ThaJMWYbL+ttnFzWglG7bx2hAfAyaXg+7aKS9seM0IXDvCZ3cyfdTbZKUGCoK4NX6LvT 47GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="o/FrMqw7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p5si3661668ejo.398.2021.02.18.03.30.50; Thu, 18 Feb 2021 03:31:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="o/FrMqw7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231371AbhBRLZW (ORCPT + 99 others); Thu, 18 Feb 2021 06:25:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:54478 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232591AbhBRKKp (ORCPT ); Thu, 18 Feb 2021 05:10:45 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B33B864EAD; Thu, 18 Feb 2021 10:09:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613642999; bh=zaWHyoh91bO/x1e3pm+5Nn3sQ06OCkntg0lilcJqvvQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o/FrMqw7434MBE86fAMPULCgRFDVFfB8HEZiAKOYnTJFaYxVc7/k6gVvjBhh2FLvF KwENkVPEvB+F1DHJneutPYhKdLtBIYvBz5H0TIwvq6kkK3EjVZiwrNc2JdC4KiwfTR KBQezUooyiaV+4WfVkXCm5EGokGUWUMODN11/hME= Date: Thu, 18 Feb 2021 11:09:56 +0100 From: Greg Kroah-Hartman To: Badhri Jagan Sridharan Cc: Guenter Roeck , Heikki Krogerus , Kyle Tso , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] usb: typec: tcpm: Wait for vbus discharge to VSAFE0V before toggling Message-ID: References: <20210218100243.32187-1-badhri@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210218100243.32187-1-badhri@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 18, 2021 at 02:02:43AM -0800, Badhri Jagan Sridharan wrote: > When vbus auto discharge is enabled, TCPM can sometimes be faster than > the TCPC i.e. TCPM can go ahead and move the port to unattached state > (involves disabling vbus auto discharge) before TCPC could effectively > discharge vbus to VSAFE0V. This leaves vbus with residual charge and > increases the decay time which prevents tsafe0v from being met. > This change introduces a new state VBUS_DISCHARGE where the TCPM waits > for a maximum of tSafe0V(max) for vbus to discharge to VSAFE0V before > transitioning to unattached state and re-enable toggling. If vbus > discharges to vsafe0v sooner, then, transition to unattached state > happens right away. > > Also, while in SNK_READY, when auto discharge is enabled, drive > disconnect based on vbus turning off instead of Rp disappearing on > CC pins. Rp disappearing on CC pins is almost instanteous compared > to vbus decay. > > Signed-off-by: Badhri Jagan Sridharan > --- > drivers/usb/typec/tcpm/tcpm.c | 60 +++++++++++++++++++++++++++++++---- > 1 file changed, 53 insertions(+), 7 deletions(-) As this seems to be a bugfix, what commit does it fix? Should it go to stable kernels? If so, how far back? And as this is the merge window, I can't do anything with this until 5.12-rc1 is out, so be prepared for the delay... thanks, greg k-h