Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp787555pxa; Wed, 5 Aug 2020 12:46:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQbculkdr76FGLwQniiIo658mvObsxq+PkFuOnMuACw8ZHa/z/VrC+XnTMc+eYRWcrkhqG X-Received: by 2002:a17:906:1cd4:: with SMTP id i20mr879342ejh.480.1596656785746; Wed, 05 Aug 2020 12:46:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596656785; cv=none; d=google.com; s=arc-20160816; b=hH72iNqy+t7w1dChLvD/ibUcqs1dayp9TStdHNRQ4GldXEURP0/is6lI3Xpsb++OZN EPDvPs9v/ECiH3y1xZkq4uCXRj4jEKI+iLecBBCpdy6EN6BuKW21T5rVVM7VvnIFPyf3 mSJbbpJEbqybUYzZOgSCaGgkDklPZUZJaw/cJZfdinFworVs2+XSWk0GKKIsmYiaQHAY at75+lazrx8BgblDiklhPNymnJIxYpLKVsZih3D09vpccuF9dNUa9s7GgryOOt7/67UM bbnrIdRECuDScDDOv5ey3B0Bbl3+n0FUo7l4wdUwR89iAM26A/epoLZ6wvIgN7DuwktX GZpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=JXg1rw7TER/dCS/fPia5Ipaa/xp5S6D1puoEf6L0It8=; b=vd4srdTC0v6vHfuuNU7WlpQy9PowgQp6EV7LbbK+TLG5BfzQixY40PgpIG0cl1gtUy X5jk/LLccUZGtlPBdqujhMZ3czVIyIlNKy93l5hKFG6eCsET4rJbJOf76ds4CkfxHU2W syRVuA2mfyvOsF0VkUw/+p/JHDxhgNHdA2AibiT0mxZ7rNhPVmeOpu/01JSWoaTROwQH S2vF1+m/tYu87L9h9UnZID1+RZGSawgNJen7t1jzFuk+P2khe7741mRAwQEz7GlE7Q4X qg6dm1NKGCz5v9HFWdGFKrTI63GRQledRC4NirbXfUAgpB7WCKMEUGYS9MSE7wLLJDG+ UIBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="YvH/uR8J"; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j3si1910033edt.444.2020.08.05.12.46.03; Wed, 05 Aug 2020 12:46:25 -0700 (PDT) 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=@chromium.org header.s=google header.b="YvH/uR8J"; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729710AbgHETpi (ORCPT + 99 others); Wed, 5 Aug 2020 15:45:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729075AbgHETpG (ORCPT ); Wed, 5 Aug 2020 15:45:06 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48146C061756 for ; Wed, 5 Aug 2020 12:37:27 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id k18so34565825qtm.10 for ; Wed, 05 Aug 2020 12:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JXg1rw7TER/dCS/fPia5Ipaa/xp5S6D1puoEf6L0It8=; b=YvH/uR8JUCjfa4yM05TlsoHznQuDvY432VhGlVI/pHdGA1BNxkCdTFQLKNPQk7DB9o W4exEUyJxqcw7cA1t+hPZwLSyc3Za2zW1De+bmu7LZaqLd+wZaAHQ/k3x94ZJc74RpV4 mjaAWtz6Mv47ROUZZfcRldBd6j8emltAm+zoE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JXg1rw7TER/dCS/fPia5Ipaa/xp5S6D1puoEf6L0It8=; b=CQJb+Wz4Jg+iCr9N8k3Lijs2lq8ij5G9NAIbDvOAmRBsX6/IB1PzToFvMKzrHmWjnC dKP51Yb7DmSLVyxxA0Z2+x1TmlmwchlVe1U3uPJ2vcc9zNGJRWW1T9AuHIk4XEjloatc nNtL0X7jGToBkOIkId//i6wa5k5QVJ1aZzX7+pYunp4H0aXfzx0LStYssS3zb+8+bzcW 5rz6lbo9srLKt/La4alU3VXxnNiRpK/tgEF6LgUmUtHzCZutSr1/9BvARDJiUU/9pweo xnT/9wC6cy6EKdCkdnBVXHnINDF2n8uCKSXAJ5CjEBw1A8usJAbhXjPS84KP/065sK98 iZIA== X-Gm-Message-State: AOAM532cI99jZUFPEmgn4vnFcTJltYXp3tz9gUWiD4uv4dSuKRw6S6zW hoJF+eiaWpVwEto0X/EMOulTp7HDB2hGGXgHcLSOmw== X-Received: by 2002:ac8:777a:: with SMTP id h26mr4947670qtu.141.1596656246037; Wed, 05 Aug 2020 12:37:26 -0700 (PDT) MIME-Version: 1.0 References: <20200730225609.7395-1-azhar.shaikh@intel.com> <20200730225609.7395-3-azhar.shaikh@intel.com> <20200730230238.GD3145664@google.com> <20200730232504.GG3145664@google.com> In-Reply-To: From: Prashant Malani Date: Wed, 5 Aug 2020 12:37:14 -0700 Message-ID: Subject: Re: [PATCH v2 2/2] platform/chrome: cros_ec_typec: Avoid setting usb role during disconnect To: "Shaikh, Azhar" Cc: "bleung@chromium.org" , "enric.balletbo@collabora.com" , "groeck@chromium.org" , "linux-kernel@vger.kernel.org" , "heikki.krogerus@linux.intel.com" , "Patel, Utkarsh H" , "Bowman, Casey G" , "Mani, Rajmohan" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Azhar, On Wed, Aug 5, 2020 at 12:22 PM Shaikh, Azhar wrote: > > Hi Prashant, > > > Is this documented anywhere? Kindly provide the links to that if so. I wasn't > > aware of any ordering requirements (but I may be missing something). > > The configuration of the connector should always happen in the order defined in the > USB Type-C specification. Check ch. 2.3 (USB Type-C Spec R2.0). So that will basically give you: > > 1. orientation > 2. role(s) > 3. the rest. Thanks for the link. Are you referring to Section 2.3 (Configuration Process) ? I couldn't find anything there which implied any required ordering (I'm reading Release 2.0, Aug 2019, so I don't know if something has been added since). Could you kindly point me to the appropriate subsection? Additionally, I think any ordering requirements there are already handled by the TCPM in the Chrome OS EC. > > Also I see in USB Type-C Port Manager driver the above mentioned sequence being followed > https://elixir.bootlin.com/linux/latest/source/drivers/usb/typec/tcpm/tcpm.c#L664 In addition to the above, note that this is a TCPM implementation (on Chrome OS the TCPM implementation is in the EC), so what is done there doesn't necessarily apply to cros-ec-typec. Best regards, -Prashant > > > > > > -Prashant > > Regards, > Azhar