Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp361616pxb; Thu, 19 Nov 2020 03:16:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwI89SIdbmNkOAfRv58vFqvPAVpb5CS4b8MZasNe+S6QZbkm2n5erZDOpf3W+968YN2I0FK X-Received: by 2002:a17:906:512:: with SMTP id j18mr28634454eja.370.1605784567607; Thu, 19 Nov 2020 03:16:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605784567; cv=none; d=google.com; s=arc-20160816; b=S0dUTJ8cql671/gZAW4fNb6F6G9jk5kMAUoKCt0z2TYeEF5n+YiIY1JQWeSyfIM1Qy 0rTSTIBPJzadGqm7kZVbjRtho/MHyD8M7slaOwQY7ZjzvlSZu3fWUrNbsW/fZbJyz8ll XWUPKRS4sqkt0cck7hh0gM1Tkdnlx/2D499c/H7FTMQWD4cy5nCQ0vPBLIHgnvMOVqe3 m9Y3cvHfrOupo8bCxWrh27QQ0SQev1f3gmNZKCqaq7kHLmsk7ZWwo2snSm98UqQtNIz6 p7ATtEtmmgPXuM0xq9A7YEHDPwL81S4rIWZ62NmWbDc8OMKciqKdG4aovdiQKLWMXAVP nsgA== 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:ironport-sdr :ironport-sdr; bh=8UxggOC71aXGFWGZRj7DuGsjuq3fgtCntFBP2b0deaQ=; b=Net2I96XD/6Gie33OQ4gOSqd0LvC4qVQGnZi8mQKnBUL4Q7Ek+UAhY7K9hg88b8tJo ytCPhH9hYts572+IChMBH6iPTGBrDYroHC7LeU5pE5JZjxm9iptGduca2eWHAwfgqT9O W+YX9rVZAruEgjt+Fqi96OObkpXu/cQdQMUcBCqOnC+YDdDv3Xan8yyaDrewogwDFdmA SljU5WrmMlHaUGSBR4GYvjgEIANHALY0KEO+XLIyFYKqNl8n1i5ChhC8eY8aLr/ppNsF tZ63OkegAHfL4AhOZYe87NZ06RGT5UU3s3y9R04q8+mDstZ64Z2LLTjHkKEOuR01ywaG YxBQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb26si16551465ejb.603.2020.11.19.03.15.44; Thu, 19 Nov 2020 03:16:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727025AbgKSLLk (ORCPT + 99 others); Thu, 19 Nov 2020 06:11:40 -0500 Received: from mga12.intel.com ([192.55.52.136]:40924 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726854AbgKSLLj (ORCPT ); Thu, 19 Nov 2020 06:11:39 -0500 IronPort-SDR: ujy6K6kMFFzbAptR53cy0pmCUUjYsjlW41GwnuxgBLVd8kNsPebWcmdpyJh9W7gxqL8IkIDPJc 8vydSL9SpaXQ== X-IronPort-AV: E=McAfee;i="6000,8403,9809"; a="150540880" X-IronPort-AV: E=Sophos;i="5.77,490,1596524400"; d="scan'208";a="150540880" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2020 03:11:39 -0800 IronPort-SDR: tas3pm4x9Zgkn7cH9XmrFkOx5z4pNye55fCTSH2uYnxcmn/jKBGWUT9lF4RfwwOBJSfZxUQ81/ 9ldsKwei4cvw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,490,1596524400"; d="scan'208";a="431193767" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 19 Nov 2020 03:11:36 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Thu, 19 Nov 2020 13:11:36 +0200 Date: Thu, 19 Nov 2020 13:11:36 +0200 From: Heikki Krogerus To: Benson Leung Cc: Prashant Malani , Benson Leung , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [RFC PATCH 2/3] usb: typec: Add product_type sysfs attribute file for partners and cables Message-ID: <20201119111136.GB3774817@kuha.fi.intel.com> References: <20201118150059.3419-1-heikki.krogerus@linux.intel.com> <20201118150059.3419-3-heikki.krogerus@linux.intel.com> <20201118174821.GA1966168@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201118174821.GA1966168@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Benson, On Wed, Nov 18, 2020 at 09:48:21AM -0800, Benson Leung wrote: > > +What: /sys/class/typec/-partner/product_type > > +Date: December 2020 > > +Contact: Heikki Krogerus > > +Description: USB Power Delivery Specification defines a set of product types > > + for the partner devices. This file will show the product type of > > + the partner if it is known. Dual-role capable partners will have > > + both UFP and DFP product types defined, but only one that > > + matches the current role will be active at the time. If the > > + product type of the partner is not visible to the device driver, > > + this file will not exist. > > + > > + When the partner product type is detected, or changed with role > > + swap, uvevent is also raised that contains PRODUCT_TYPE= > + type> (for example PRODUCT_TYPE=hub). > > + > > + Valid values: > > + > > + UFP / device role > > + ======================== ========================== > > + undefined - > > + hub PDUSB Hub > > + peripheral PDUSB Peripheral > > + psd Power Bank > > + ama Alternate Mode Adapter > > + vpd VCONN Powered USB Device > > I have it on good authority that "vpd" is incorrectly categorized here, > and for future proofing, we'd better not introduce vpd as a product > type for UFP... > > A vpd is actually more closely related to a "cable" than it is a "UFP." > A closer reading of the USB Type-C and USB PD specs will reveal that > VPDs can only ever appear as SOP' and not as SOP, so having its type > appear under UFP is a mistake. > > In other words, the USB PD V3.0 R2.0 spec is wrong. A change has been > working its way through the spec committee to fix this, but it is not yet > published. > > In order to reduce the amount of churn, I would recommend not > including vpd as a possible type until a new version of the spec (or the ECN) > is published. Thanks for the heads-up. I'll leave the vpd out then. cheers, -- heikki