Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp360169pxb; Thu, 19 Nov 2020 03:13:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZJ4DjXTdNS0cEvdcWK885+akvuFMMBSfbdOlCEeDf7eBq7k9V+jN3NoyIP9u/Do0nkrwU X-Received: by 2002:a17:906:2756:: with SMTP id a22mr15410173ejd.81.1605784402848; Thu, 19 Nov 2020 03:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605784402; cv=none; d=google.com; s=arc-20160816; b=NbOk3XDN37fQ1xbokAoL9OdSARFKcPZuTrHCrmr78ZkYFCiCY5tpmTlFQHMdo6v4h1 c/Gdxrnm6YayzeplXmxvVX1EoFDGl6hfJGiTlQGmKlkQm6QPU12bHYHwytFP4VEfrOp1 YOFt74o05hAOc5QCQ/j/K+UpOk+2v19OEBHMm2qIP9QwQraK4pr/s+myZBydsm8ddGKk /p1Z5MBesWXzLF4q+xytefTJ1DFMnUUQMPVjuO4MBGl0JhpJWsSFx9InsquFOwjd/9HF 2xrzNy5bdj/ttrfRD+t7MvMli2nLD3ZDkUmzx4pI415RJ5TjMvV31/mzzhypPyCEdHNE 0NEQ== 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=UfLyjkfwBrBUnjzFIrrwPghdB/OgyfJa54TI3oCwR5M=; b=UhUH7ogJ7uARIE2RAlkNHVlVmiXNsgXNHb47WUjpWs6xl5ja4KNvMePsix01DTh8Jk BQyb6dsVC2VwOEjnMY+DBSMrZ34rarKZkrxAjv2haUie3P+n9oOS5mAe77y2VyqXHmJ9 +QVzUirVL85OJ7JpAgwcS0BpbDCdBv5yoQhufEXQfsq0vYLdkza4eJXpcxhj7lAYHDGR O/R9sIyDvpAviXOwwbui51BKvA0P9d2M+/xepfoZFdf4QpKPhV6i5ws5z2iL3GxFVK7j b/rnJzm49bpV84mAcGWY5qdbB2hgAwXmRyPxPh7F+bzZ8StXnEivgW/Ihzue9FlCylMr Y+wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="FE98KhE/"; 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 m17si6519912ejb.268.2020.11.19.03.12.58; Thu, 19 Nov 2020 03:13:22 -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=@chromium.org header.s=google header.b="FE98KhE/"; 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 S1726878AbgKSLLZ (ORCPT + 99 others); Thu, 19 Nov 2020 06:11:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726794AbgKSLLY (ORCPT ); Thu, 19 Nov 2020 06:11:24 -0500 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD7CDC0613D4 for ; Thu, 19 Nov 2020 03:11:24 -0800 (PST) Received: by mail-pl1-x643.google.com with SMTP id p6so374975plr.7 for ; Thu, 19 Nov 2020 03:11:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=UfLyjkfwBrBUnjzFIrrwPghdB/OgyfJa54TI3oCwR5M=; b=FE98KhE/zieVucMJBIqQZyiC/wDqGqm71dFG662oU6gzFe2rvQi62sHw585ekHW7uh T599Ft4t1FzLd8vdfqseckUNGKB6ulFnFvOMqXwIY+KOCLV3buh42pMmamEFHSod7Hg9 CrKXc9HIxVKY7OkDFCMbZ69uCrBsI3mALkbC4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=UfLyjkfwBrBUnjzFIrrwPghdB/OgyfJa54TI3oCwR5M=; b=UWY/bb4RNlYbFW2IldyeOEODmlPvl5rrom/LgXH2yCQ/r4OwwLQTrCHSJvE+xhX1fs tqU6VV57ea8NTkdZIQNPq+5J9cKcTlndD+qWmgrgSyASOZNVRTWyyts5WSeruqFwt4iX h5wseqmKeWa0uERo0GrCq53v1qZFT69Ix8fL5T/ldHQ9zvMhI9G+aI1B+sAEgZw86OTV ah/DkuZRrZRZDXVLeDxWVYcunmgwgGG1bFtbbSvIStbmmNwARDsAznjZ4dp3u1Vbv/gh 6PR9/L1WcsJBaN6isUoBZ53ixdkgcbSnpLgp7qBN9fyBQMywTA3Jres+wgg1TU2xSeJP dIug== X-Gm-Message-State: AOAM530H5PBeSQOcGfOK97Ia5/vn+LeNCsvMJ1mscBU5/XJofWmxCjYS no6Ukfqb0Hhd9H7s7/VIKMUfdA== X-Received: by 2002:a17:902:778d:b029:d6:489c:67ee with SMTP id o13-20020a170902778db02900d6489c67eemr8644110pll.52.1605784284295; Thu, 19 Nov 2020 03:11:24 -0800 (PST) Received: from google.com ([2620:15c:202:201:a28c:fdff:fef0:49dd]) by smtp.gmail.com with ESMTPSA id l76sm614091pfd.82.2020.11.19.03.11.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2020 03:11:23 -0800 (PST) Date: Thu, 19 Nov 2020 03:11:22 -0800 From: Prashant Malani To: Heikki Krogerus Cc: 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: <20201119111122.GA3891271@google.com> References: <20201118150059.3419-1-heikki.krogerus@linux.intel.com> <20201118150059.3419-3-heikki.krogerus@linux.intel.com> <20201118185350.GB3652649@google.com> <20201119110506.GA3774817@kuha.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201119110506.GA3774817@kuha.fi.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Heikki, On Thu, Nov 19, 2020 at 01:05:06PM +0200, Heikki Krogerus wrote: > On Wed, Nov 18, 2020 at 10:53:50AM -0800, Prashant Malani wrote: > > > +What: /sys/class/typec/-cable/product_type > > > +Date: December 2020 > > > +Contact: Heikki Krogerus > > > +Description: USB Power Delivery Specification defines a set of product types > > > + for the cables. This file will show the product type of the > > > + cable if it is known. If the product type of the cable is not > > > + visible to the device driver, this file will not exist. > > > + > > > + When the cable product type is detected, uvevent is also raised > > > + with PRODUCT_TYPE showing the product type of the cable. > > > + > > > + Valid values: > > > + > > > + ======================== ========================== > > > + undefined - > > > + active Active Cable > > > + passive Passive Cable > > > + ======================== ========================== > > > > There exists a /sys/class/typec/-cable/type attribute (connected > > to the "active" field in struct typec_cable [1]), which is supposed > > to be populated by the Type C port driver. Won't the newly introduced > > attribute duplicate the same information as "type"? > > True. So we don't need add this for the cable separately. I'll just > modify the code so that it considers also the response to Discover > Identity command if we have access to it. > > Would it be OK if we name the file "type" instead of "product_type" > also with the partners? That makes the naming consistent. Sounds good to me :) Best regards, -Prashant