Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6025108pxb; Mon, 14 Feb 2022 13:23:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAFw+8ilrv2JHAuTXtiBL7ANfe6CLGX2FXPMumTVuWAmLl9M6U1LTOeT6xheZr6+7V7jil X-Received: by 2002:a63:4852:: with SMTP id x18mr827394pgk.286.1644873809692; Mon, 14 Feb 2022 13:23:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644873809; cv=none; d=google.com; s=arc-20160816; b=UzzbO8KoyUt1yAMp6346xKF285kMX2E+XcKeBn3AClQt4idFws4JUdsfMJn4L5/Jop dCjSNbHTI+x93T8He20TNGN9iA76wNf9/2zNNPYiUcSaZJW1KMpSdWaIWgBFYyMHiiam WR9cblZIh9vEciAks3KH6jz1pHIdfBmZOSn/hdA6JUdi8Vi+Qunl7bOJ/b0kAyYB6NoQ 391F3QuJxK+GLP9v0rW1HZqNZcyPMpPeiyRuJwBWFo+1q6u0cgpziTxV+udbZ7Ow0unF Mo9HUQiwG4sZ+01hs3se/9U+ZbpYqDGEydzcd6tiAXQVz3yQkjPw4NSFc70+EMMk9+ga QkQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=vzrVMcjVHERtKSM0FYQPAihvxExHzZg8a0NX0dN9W9w=; b=XevF7Yu+9M1rcKefHKPJTTobo1UZJBKzlIBFDwe408Oe2CNjEz1+bSRsTcsnMTIV9C 6eD83ytthJS/D7MJO30BfqtNK9hQzhFqi0stUlWatea0nJJu7UOhIcGLVsyKXcF35vgE zzgrzYXAKMGdiygWkRYrFLNRym/nriUvtXScxhiU/rrLwHfqfonhWbSzns66BqyTngoI 4Pel5rEVgZ3DmNLzzHyuLcPhzRNJBjL1QyKFzciLm7AFgKlOsXHk9c+SLd9YV3OEK0j6 iyeyZiXaO0GXH/zTtpWJJMMUt3D8LkR2ftIAcibn29LaqJEVxEUVjVSUXtOaora/BY7a 2sLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b11si30816122pft.58.2022.02.14.13.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:23:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 540152396B5; Mon, 14 Feb 2022 12:40:16 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229638AbiBNTRE (ORCPT + 99 others); Mon, 14 Feb 2022 14:17:04 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:39030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbiBNTRD (ORCPT ); Mon, 14 Feb 2022 14:17:03 -0500 Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A16E38BE8; Mon, 14 Feb 2022 11:16:47 -0800 (PST) Received: by mail-yb1-f182.google.com with SMTP id c6so49189552ybk.3; Mon, 14 Feb 2022 11:16:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vzrVMcjVHERtKSM0FYQPAihvxExHzZg8a0NX0dN9W9w=; b=LzC9CpZJw5c/+sCSHlomBOlNFZex7aWXnBGiIv5HvRZvFwBmzv0fU1YaY8VuW5cS9a kl8RCQg+q9bPskItICSprAaOJ1lDH2vcH6JkjsVzjbHeeCIJ/TqYLNcu6SHljpuz5hlG 2/Vxcze7DthyCnubaw2low8Kqqz4n1cB4RL8IcjZtbJFY7NrbP+CWfqbhNAsSbT0Br20 blNGU9DIcfQWCXKZB1CSEOR1rrJIA+gqpNmQRKtN7FEwEj4M2NMfMDfZuX1tkqhR2Cci NaYoh9hSGkFwCIS89d5Ejdrn6lNtSqEop0izf1IrKs24GdnrsTlyuWJaCarKjJTI8iXr kQXg== X-Gm-Message-State: AOAM5328lZ2Ulr+eqV/NjHKXdJQkyjPTBhApH1PSCrPF/zTDSnZqDJGs xYNzR0WfsUnyAcpgQo4CFPu8S3Tx28NybG+2tRQ= X-Received: by 2002:a25:7e81:: with SMTP id z123mr523455ybc.466.1644865924393; Mon, 14 Feb 2022 11:12:04 -0800 (PST) MIME-Version: 1.0 References: <20220211023008.3197397-1-wonchung@google.com> In-Reply-To: <20220211023008.3197397-1-wonchung@google.com> From: "Rafael J. Wysocki" Date: Mon, 14 Feb 2022 20:11:53 +0100 Message-ID: Subject: Re: [PATCH v6] ACPI: device_sysfs: Add sysfs support for _PLD To: Won Chung Cc: "Rafael J . Wysocki" , Len Brown , Heikki Krogerus , Benson Leung , Prashant Malani , ACPI Devel Maling List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Fri, Feb 11, 2022 at 3:30 AM Won Chung wrote: > > When ACPI table includes _PLD fields for a device, create a new > directory (pld) in sysfs to share _PLD fields. This version of the patch loos better to me, but I'm not sure if it goes into the right direction overall. > Currently without PLD information, when there are multiple of same > devices, it is hard to distinguish which device corresponds to which > physical device in 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. So I think that this is your primary use case and I'm wondering if this is the best way to address it. Namely, by exposing _PLD information under the ACPI device object, you'll make user space wanting to use that information depend on this interface, but the problem is not ACPI-specific (inevitably, it will appear on systems using DT, sooner or later) and making the user space interface related to it depend on ACPI doesn't look like a perfect choice. IOW, why don't you create a proper ABI for this in the Type C subsystem and expose the information needed by user space in a generic way that can be based on the _PLD information on systems with ACPI?