Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5867851pxu; Thu, 22 Oct 2020 13:09:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaww96xWevybSp+aovwC8qHYd/vid0yvzlA+Ad5ldfKpf8GG/7ChP3E2wJUccvVWzMde4K X-Received: by 2002:a50:cbc9:: with SMTP id l9mr3708576edi.310.1603397355540; Thu, 22 Oct 2020 13:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603397355; cv=none; d=google.com; s=arc-20160816; b=hiauHRVzXY+fOSQ/5w5s+swIboVUfD/pHIM2SXpqeEVHGtRSiKf64bdki6D6PaAE7B o/jk0vKYFR1jlrDshzvf69ikezu+pjX6QUHo+v1rjQ3cnHKTsfrSJc7O03SkzDGxnBQx OP5omdEAu/KHdajXkPorlpZtLGZ0oLNHOs+25gfgp9k5u20axFaibuYKManPqz7WURXW 4p9LFkHT5d1XLooMQxxRqEDhftCYtrVFpvfqfXFmK0Xfhi85eHEV84QpmFA5GBqmXW4R 0T6DbwGFqi1ToLV0q2k19xqQylsD1rc1eHGWdaoqopVFzt0If54U0Cd5O1X8f8TUoh++ laWQ== 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=0j71MC7rEYJVZrFpsUziIkkuyyUhiqEUgVswauLO1v0=; b=Ujcc6d74kj+17MZ5RRF/mysp2XmmYem/juxWeUJYfU/j0SFwuYrrvAjvkYb0HXTk41 /pFXkOJpJ4TMCXI0+sTm7hZFZZftps9ZYMvLeEoU5AqTII8hAMQVYf9nfl+SibPPOlv+ eyuDovZatsYiwwxE1w5uvvczrWeKIQt2KuYuJv39EeejphiXEpUFuGFZe58E+UGnTSLk 0H2QiPgI3Stqn1TS44EjRmurh2t8u7cbQ8fLjY0DrpwdEWyXtWwp9bHioyuSFHjOETAa iO/ZAoygfM9yny/rN7B7kk3EYl+N8k50flEJ6R3jSEjEdjc5KlYvMm7q7S5r6azSdD2p n8YA== 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 o18si1551754ejx.472.2020.10.22.13.08.52; Thu, 22 Oct 2020 13:09:15 -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; 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 S2898638AbgJVMnU (ORCPT + 99 others); Thu, 22 Oct 2020 08:43:20 -0400 Received: from mga03.intel.com ([134.134.136.65]:50686 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505168AbgJVMnQ (ORCPT ); Thu, 22 Oct 2020 08:43:16 -0400 IronPort-SDR: dBV59pkk61YVJ3y97vqIqLpxmYmtooHRVUpyQumrf1P+/4bVF1de16lHs/KGgTcev7SGM+oDxu wKRCNnE5sX9w== X-IronPort-AV: E=McAfee;i="6000,8403,9781"; a="167615571" X-IronPort-AV: E=Sophos;i="5.77,404,1596524400"; d="scan'208";a="167615571" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2020 05:43:12 -0700 IronPort-SDR: HBghbPpVJubVf1gjnx8GQuAv69Q98ioZov+K7O0q3NvV33slZ9hU/m9z0b/1MnZXsRTmMi8TWQ KTZh6/twUyZA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,404,1596524400"; d="scan'208";a="423109076" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 22 Oct 2020 05:43:09 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Thu, 22 Oct 2020 15:42:48 +0300 Date: Thu, 22 Oct 2020 15:42:48 +0300 From: Heikki Krogerus To: Prashant Malani Cc: Greg KH , Linux Kernel Mailing List , "open list:USB NETWORKING DRIVERS" , Benson Leung Subject: Re: [PATCH v2] usb: typec: Expose Product Type VDOs via sysfs Message-ID: <20201022124248.GQ1667571@kuha.fi.intel.com> References: <20201022061554.3418060-1-pmalani@chromium.org> <20201022065719.GA1440360@kroah.com> <20201022071753.GA1470296@kroah.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-kernel@vger.kernel.org On Thu, Oct 22, 2020 at 12:25:07AM -0700, Prashant Malani wrote: > Hi Greg, > > On Thu, Oct 22, 2020 at 12:17 AM Greg KH wrote: > > > > > > > +What: /sys/class/typec/-partner/identity/product_type_vdo > > > > > +Date: October 2020 > > > > > +Contact: Prashant Malani > > > > > +Description: > > > > > + Product Type VDOs part of Discover Identity command result. 3 values > > > > > + are displayed (for the 3 possible Product Type VDOs), one per line. > > > > > > > > sysfs is "one value per file", not "one value per line". This is not > > > > ok. > > > > > > I see. Would listing these out as three separate vdos (i.e vdo0, vdo1, > > > vdo2) be better? > > > > Given that your current implementation is not acceptable, something has > > to change :) > > Got it. I'd like to see if Heikki has any suggestions on naming these > entries better. Why not have product type specific attribute files? So if the partner is UFP, then we expose ufp1 and ufp2 files that return the UFP1 and UFP2 VDO values and hide the other files: % ls /sys/class/typec/port0-partner/identity/ id_header cert_stat product ufp1 ufp2 If the partner is DFP, then you expose the dfp file and hide everything else: % ls /sys/class/typec/port0-partner/identity/ id_header cert_stat product dfp And so on. thanks, -- heikki