Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3802189rwb; Sun, 20 Nov 2022 22:43:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf5tdZpyqrbHg7hwy9D6Y/+4o5OykjIMVmLkoabdCi3dm8R5riFpmhuM0g6isSuZNkTxA1Hp X-Received: by 2002:a05:6402:1397:b0:467:78f2:d81f with SMTP id b23-20020a056402139700b0046778f2d81fmr617776edv.88.1669012983675; Sun, 20 Nov 2022 22:43:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669012983; cv=none; d=google.com; s=arc-20160816; b=VEvCf5JwVwWh7EBgRB59JWXuavEH3m3oHqulrkZ71o0fHQ2py5LD2BaYEkH5pMxpv2 6Cck/yfLjWPs2sjqcTvKxl7cmPl9CIhwqMia4UCzZ/AkJrEHn5X5jtW2k7ZnnVXe0rvS k3HNj1s4Og+JWp7B2JR7UY0lfuToAY7O0MacNDG8deo82GQ4Qg/YD+1p7DcWn5X0tJuJ agaUinRjd93iBMeH89ArEq3o5DwFwyeImrG7bfTn+2jMCGWYpXIw/imrNQim2hyBqu2D PIGYPljuLIdCm+g2ICjopMAUe5UNLEosI3oEiz4fSrxJ4E2VEIeLNnc3fO0rebrYJR2o 6mbQ== 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=ykV2sqfYGciXRkD5rlaM6fIf0tzT1eFk3AmQV0AE/qk=; b=wyxQr47zCRUm/ePpTgRT4sPpjF1nQyuCLRzYTv8jaWeWj3ydmkCVh7QLd7MyHni0tr VDs+PtEu9jfD7hqMTwMCNWlhi78tfeHaYaSGygmVd7fGAWy+5Vt4xcCtWx4puo8kqn0r B/Pld/h5tJROkF0zFGnUgs3IcozBg5UUt9Tg+yjuB7r27ewXJ6ljCITQXLQ6e3v3oog4 eSh2OrmbrEXwh8f5Oz1dSMSgN2LNZYNYgvo4BKQ62puw8WFYkDZnAj+PfY93eXwQRYmT SuqPeEkSunjvCbFSAlBl3PP1Wy6rqWe/VPcsCiL4imRQy1NqeD8bNwtADYz+dRTwuCtV s0+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fTe+qp91; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq28-20020a1709073f1c00b007882936243fsi9600568ejc.772.2022.11.20.22.42.39; Sun, 20 Nov 2022 22:43:03 -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=@linuxfoundation.org header.s=korg header.b=fTe+qp91; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbiKUGfp (ORCPT + 92 others); Mon, 21 Nov 2022 01:35:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbiKUGfl (ORCPT ); Mon, 21 Nov 2022 01:35:41 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 691E231347; Sun, 20 Nov 2022 22:35:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 16B91B80C8B; Mon, 21 Nov 2022 06:35:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 566AEC433C1; Mon, 21 Nov 2022 06:35:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1669012536; bh=7CYs8BBS+Jsc6TV659IdrBe1it3eg5ejFxeuLhuykqs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fTe+qp9151qJnBdXHiBQ4c5KYz3rxfymOdaO0T/mInww2BFb8qiVSoAXLzE5iCPfg cWI1T7EZtTvH3s5kCeRyt4OLu6oMgasStG2eyRjdHJ+SA/5KUjZeMF3mC8IAtiZDl/ LCX8qZSPG85grDCOFDitpDEj4bvjY25G/MCheuTc= Date: Mon, 21 Nov 2022 07:35:32 +0100 From: Greg Kroah-Hartman To: Prashant Malani Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Heikki Krogerus , Benson Leung Subject: Re: [PATCH] usb: typec: pd: Add symlink to linked device Message-ID: References: <20221121062106.2569297-1-pmalani@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221121062106.2569297-1-pmalani@chromium.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Mon, Nov 21, 2022 at 06:20:39AM +0000, Prashant Malani wrote: > There exists a symlink from a device to its USB Power Delivery object, > but not the other way around. Add a symlink from the USB PD object to > the device which it's associated with, and call it "device". > > This is helpful to identify said device (a Type-C peripheral for > example) during uevents, since during USB PD object > creation/destruction, a uevent is generated for the PD object, > but not the device linked to it. > > Cc: Heikki Krogerus > Cc: Benson Leung > Signed-off-by: Prashant Malani > --- > .../ABI/testing/sysfs-class-usb_power_delivery | 6 ++++++ > drivers/usb/typec/pd.c | 12 ++++++++++-- > 2 files changed, 16 insertions(+), 2 deletions(-) > > diff --git a/Documentation/ABI/testing/sysfs-class-usb_power_delivery b/Documentation/ABI/testing/sysfs-class-usb_power_delivery > index ce2b1b563cb3..e7d19193875f 100644 > --- a/Documentation/ABI/testing/sysfs-class-usb_power_delivery > +++ b/Documentation/ABI/testing/sysfs-class-usb_power_delivery > @@ -4,6 +4,12 @@ Contact: Heikki Krogerus > Description: > Directory for USB Power Delivery devices. > > +What: /sys/class/usb_power_delivery/.../device > +Date: November 2022 > +Contact: Prashant Malani > +Description: > + Symbolic link to the directory of the device to which the USB PD object is linked. Line is way too long. But wait, a "device" has a specific meaning in a sysfs file, and that is not what is happening here. Please don't make fake "device" symlinks when these are not really using a device here. Either fix it up to properly use the device structures in the code, or call this something else. What in userspace wants to see this symlink? thanks, greg k-h