Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp4182397pxm; Tue, 1 Mar 2022 13:05:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFNQinTD1kjNMsWNyrMdQ/GW5t35y2OShCKsEEOm+k5iWjuqDKLFmW7q04+rYoptM3XlsV X-Received: by 2002:aa7:cf06:0:b0:405:e0c8:8b5d with SMTP id a6-20020aa7cf06000000b00405e0c88b5dmr25624299edy.367.1646168755002; Tue, 01 Mar 2022 13:05:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646168754; cv=none; d=google.com; s=arc-20160816; b=QQa4xlleixqHxGisODlE2Vlfx+iSdm68IJIvWvEw9oRZ0yv69NRjWeMBzOEBDOKokI qnq3nizYmi/yUDDE08XIAWhE0Fac1Yb3y+bbrlZ7QI3RY+PBRGyMFwnXzGSy8tvnR6/5 Ij5klHhEvql3mbzP6p1QHcFtKRHZWGxM9LFWTLL5WVETooZ1ct8G8Ude21jw674hYNff 1wM1KeLDCcaf+Ue3SadoOMxHTuNKKdYiFn6N5pvmMCyr+cY2s8nihudIxeo+DYQd4WVS nupzsXAB2uybooNG+PLuVHlgZCebqyjSo72MggI6knN6J2vkKsslD+RBGMx3hmxDY4sH uU2A== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AeIYgxAULM5ZUO/fyTsTypWZvFKbB2LIiMNBntL+ZBg=; b=sM4sEoKPZgNbz4Ko3NLLejXte9rUKQR1enRvw3J4qB68OiCYq6NpEQ5mCV0LlLoU1l 9uag5Ru78Kr+kiAD8WrQyQ85uZYCpUPDclb5ERGVysfPJvYQfqlHLvJ3UGc62LX/29i/ ilKBbnZ5E3M42OQw0/3eQKO/7AqOnfGlZEnQh6mt3ord4gWdNCuXMfYkHnQJPOxADIbX a85QmzhiwiI+bG1bdSI6+uL4CuVesOjooTs0+Lk7qeka8Knmcuq9T/LV2EJgeBIvVLcE 1A7Gou79hP+vj2vFoJ8jSdZPJvPNHpr0did6e9Eeo5lJgu4dcxt9Ejg2Y1p3Nv+xwbSV rtsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AkjUEnRR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j13-20020a1709066dcd00b006d6b7470ce1si3958413ejt.556.2022.03.01.13.05.31; Tue, 01 Mar 2022 13:05:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AkjUEnRR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233844AbiCAJez (ORCPT + 99 others); Tue, 1 Mar 2022 04:34:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233087AbiCAJev (ORCPT ); Tue, 1 Mar 2022 04:34:51 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4719ADEC; Tue, 1 Mar 2022 01:33:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646127234; x=1677663234; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=048tbWG3NAZMNu9WZUi/GCpvqCa2ZO3Gyg1+Y/iqdfs=; b=AkjUEnRR3/dpseIbwAu0+GnatluPc2cSWR9Hste7EpQvkq3JNlR/dxRp FOfWDU1oen0qgU0tyrNewJzQN3XGFJwyzF36cFqHvX8m+d9wbaZ3pYM1H n7c99x2fEc9KdZQ9IHAC+yiV7ySdpAewHsjteIHhkI13Us+lWiPma8D4U ITwDUmP/bEiLvWFfF5DEyuD4drZ8XYm0V/uRPX0uYtSJBTIgITlNSB8ex JjP+aww5usYRwqOvEP8oZQB59diX8s+zWBN2LZ3UuUvFtaxCxXnDn/b17 Q0rZk1hW7C2ERohDQ0AzHJ2iGfpcGNN91E0zkgFGpew3ThvEFQsVqfxOV A==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="250679807" X-IronPort-AV: E=Sophos;i="5.90,145,1643702400"; d="scan'208";a="250679807" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2022 01:33:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,145,1643702400"; d="scan'208";a="685662305" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 01 Mar 2022 01:33:51 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Tue, 01 Mar 2022 11:33:50 +0200 Date: Tue, 1 Mar 2022 11:33:50 +0200 From: Heikki Krogerus To: Won Chung Cc: Greg Kroah-Hartman , "Rafael J . Wysocki" , Benson Leung , Prashant Malani , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] usb:typec: Add sysfs support for Type C connector's physical location Message-ID: References: <20220301022625.469446-1-wonchung@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220301022625.469446-1-wonchung@google.com> X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Won, On Tue, Mar 01, 2022 at 02:26:25AM +0000, Won Chung wrote: > When ACPI table includes _PLD field for a Type C connector, share _PLD > values in its sysfs. _PLD stands for physical location of device. > > Currently without connector's location information, when there are > multiple Type C ports, it is hard to distinguish which connector > corresponds to which physical port at which location. For example, when > there are two Type C connectors, it is hard to find out which connector > corresponds to the Type C port on the left panel versus the Type C port > on the right panel. With location information provided, we can determine > which specific device at which location is doing what. > > _PLD output includes much more fields, but only generic fields are added > and exposed to sysfs, so that non-ACPI devices can also support it in > the future. The minimal generic fields needed for locating a port are > the following. > - panel > - vertical_position > - horizontal_position > - dock > - lid > > Signed-off-by: Won Chung > --- > > Changes in v2: > - Use string for location. > - Clarify get_pld() with naming and return type. > > Documentation/ABI/testing/sysfs-class-typec | 35 ++++++ > drivers/usb/typec/class.c | 113 ++++++++++++++++++++ > drivers/usb/typec/class.h | 3 + > 3 files changed, 151 insertions(+) > > diff --git a/Documentation/ABI/testing/sysfs-class-typec b/Documentation/ABI/testing/sysfs-class-typec > index 75088ecad202..4497a5aeb063 100644 > --- a/Documentation/ABI/testing/sysfs-class-typec > +++ b/Documentation/ABI/testing/sysfs-class-typec > @@ -141,6 +141,41 @@ Description: > - "reverse": CC2 orientation > - "unknown": Orientation cannot be determined. > > +What: /sys/class/typec//location/panel > +Date: March 2022 > +Contact: Won Chung > +Description: > + Describes which panel surface of the system’s housing the > + port resides on. > + > +What: /sys/class/typec//location/vertical_position > +Date: March 2022 > +Contact: Won Chung > +Description: > + Describes vertical position of the port on the panel surface. > + Valid values: upper, center, lower > + > +What: /sys/class/typec//location/horizontal_position > +Date: March 2022 > +Contact: Won Chung > +Description: > + Describes horizontal position of the port on the panel surface. > + Valid values: left, center, right > + > +What: /sys/class/typec//location/dock > +Date: March 2022 > +Contact: Won Chung > +Description: > + Set as "yes" if the port resides in a docking station or a port > + replicator, otherwise set as "no". > + > +What: /sys/class/typec//location/lid > +Date: March 2022 > +Contact: Won Chung > +Description: > + Set as "yes" if the port resides on the lid of laptop system, > + otherwise set as "no". > + I've probable lost track of the topic during my winter break, I'm sorry about that, but why are you proposing now that this should be made Type-C specific? This information is not Type-C specific, so it definitely does not belong here. Br, -- heikki