Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3854260rwb; Sun, 20 Nov 2022 23:46:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf5tTVs9t6zS39s7Wa5oKTmQO6IWRSk8YQUPWTO18ibfni5cjwtWrm/zsG4AuHVWa43z/nx+ X-Received: by 2002:a17:903:240a:b0:188:5d24:87e with SMTP id e10-20020a170903240a00b001885d24087emr432651plo.87.1669016767700; Sun, 20 Nov 2022 23:46:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669016767; cv=none; d=google.com; s=arc-20160816; b=HT2tVpqrBg2cEbyRZOBLqLgkZPllrUVovZrlSwMuL/kNJodFUVKXrKMbHKxV0Bigec tlXjWR6zBhDeEo5TIb3V4sjVXOuew5Z8JtdngrfYdnax7SnKcJseicwzRZL/lG+uTnEM SNmekXknDqdUDHPa8rmD5QcDvUkGaKlJZhrA4XO1uZI57tl3o38+Tq2uW+JXirqvo521 0Dz3O8yNqw57MRbROl6+mgtUH0kRFbtXxT7+X5h0vjEMamF+5jQSdQLi942+ThxORyYY oRETZ+weHCIiC1Iq8wtyjmC8wEDjzUkCK+Ofykl60B+sWwlJXooEVr8W83Gc4waXMJlm qoLg== 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=1cpwr1X1Te39IPvqdz/Fj74QyWm5FYqdbZKw2zd/ags=; b=NZqSSCf21qOyz/v+2I8AAEalZMqua3Z07hs1P5NLyanZbkBbGZUa7YtMFyGGYN7nce 2noSbHPL/Xr9MnfdFI8/8JD8P6hfZL8EpfX7NY+6Qs99HsjMdfLfJw4tjqWCodkxo7Cc ZOa0eBD0eam9+GPlDw5Fg7NhtVn1KNlT8oI6FmLsgnrpl2AG0Dne8jtcUzsfV5ZXi7KD 5tqhct98/S1BS1GAJkQy49OqVgmqi1h8ViJY6nD7wDtvsVaR5N2101LZeNhIPkgd1dN6 Sb/f0CO9E5R8QhprZPSLKEUaMv5OrpGasNMGe/uhvyV6JaiIXpwGWI6zoDI+YbIi/4iQ 2aGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MKWG8nIw; 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 k4-20020a63d104000000b0046fb2a57348si10229266pgg.84.2022.11.20.23.45.53; Sun, 20 Nov 2022 23:46:07 -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=MKWG8nIw; 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 S229687AbiKUHhH (ORCPT + 92 others); Mon, 21 Nov 2022 02:37:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbiKUHhD (ORCPT ); Mon, 21 Nov 2022 02:37:03 -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 1AA21CD6; Sun, 20 Nov 2022 23:37:03 -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 294C3B80D19; Mon, 21 Nov 2022 07:37:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C2E2C433C1; Mon, 21 Nov 2022 07:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1669016219; bh=UQLT+J4urxhzJLNhsAarTtM2K/ku7wYKlwsNM1VooQU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MKWG8nIwIshO8nJZgDE+PGYsnuOEq51F7ORAJxMzOrXNJadi6gzpOmK/noILiewbO bNtBhBoBW21Zn9xmJDktWYph6t5u39gXbwA3W0Z0e0bf67zObOc8tsd7ElbhQZCGlF 9U9bH7f1ZqG4kfMCzvn6+uMBM0zstGfcpiIs1ebw= Date: Mon, 21 Nov 2022 08:36:55 +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: 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 07:16:03AM +0000, Prashant Malani wrote: > Hi Greg, > > Thanks for reviewing the patch. > > On Nov 21 07:35, Greg Kroah-Hartman wrote: > > On Mon, Nov 21, 2022 at 06:20:39AM +0000, Prashant Malani wrote: > > > > > > +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. > > Sorry about that. I'll try to make it more concise in the next version. That's not the issue, the problem is that it needs to be properly line-wrapped. > > 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. > > Got it, sorry about using that specific term. How about: > 1. "linked_device" > 2. "base_device" ? Why either? What exactly is this "device" that you are trying to link to? And why not just use the real device symlink instead? > I prefer 1.) but happy to use the other, or any other suggestion. > > > > > What in userspace wants to see this symlink? > > ChromeOS's userspace Type-C daemon. It listens for Type-C partner uevents, but the PD objects > can be created later (and destroyed and then recreated again, for PD chargers which dynamically > change their source caps), and this helps determine which partner does those events apply to. Then set up the proper device symlink like the driver model supports, then you don't have to create a new one, and you don't have to add the documentation entry as it's implied. thanks, greg k-h