From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD080C433F5 for ; Wed, 13 Apr 2022 07:19:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233289AbiDMHVz (ORCPT ); Wed, 13 Apr 2022 03:21:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229620AbiDMHVx (ORCPT ); Wed, 13 Apr 2022 03:21:53 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D15A1FCDD; Wed, 13 Apr 2022 00:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649834372; x=1681370372; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Bd5UQaw5LoEtCwJjsmuBP9j3/YV7fnvq1iSVAJMUS64=; b=ZyLdhIKz80vf4gy9OVh9sHqWanwd69HqHHOs+IRYqnfXGxtqWt5Go56G t01af00biSEnOKMuaxNK9XQGcvw7IWbjRCObC5nXJJl9ahywqwwxP6cKj 32t5l5owqentRchZ3wZFby4Vhm8tLemUb9m3ZhvjMrLEl1Z3iVM/eMZlW /PevFKMHk5a3KwVZ9rcKdZzVWQfa9vQL7ZDqz0T2mZfkOlC7qcbd2NYNj zrMuuGylR3yQArCHECyAlEwfHjeSmPCMQzzzNlZLavQTaAEbXsVbBHl1+ xvJPbimBoMoEWVhnUCDTduof6WdxDqm1CwBHXwYjm+T5Ui6eCJx6f9VyF w==; X-IronPort-AV: E=McAfee;i="6400,9594,10315"; a="249884402" X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208,217";a="249884402" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 00:19:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208,217";a="700142728" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 13 Apr 2022 00:19:28 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Wed, 13 Apr 2022 10:19:27 +0300 Date: Wed, 13 Apr 2022 10:19:27 +0300 From: Heikki Krogerus To: Greg Kroah-Hartman Cc: Benson Leung , Prashant Malani , Jameson Thies , "Regupathy, Rajaram" , Guenter Roeck , Won Chung , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/3] usb: typec: Separate sysfs directory for all USB PD objects Message-ID: References: <20220412130023.83927-1-heikki.krogerus@linux.intel.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 Hi Greg, On Tue, Apr 12, 2022 at 04:38:33PM +0200, Greg Kroah-Hartman wrote: > On Tue, Apr 12, 2022 at 04:00:20PM +0300, Heikki Krogerus wrote: > > Hi, > > > > In this version the USB Power Delivery support is now completely > > separated into its own little subsystem. The USB Power Delivery > > objects are not devices, but they are also no longer tied to any > > device by default. This change makes it possible to share the USB PD > > objects between multiple devices on top of being able to select the > > objects that we want the device to use. > > > > The USB Power Delivery objects are now placed under > > /sys/kernel/usb_power_delivery directory. As an example: > > > > /sys/kernel/usb_power_delivery/pd0 > > No, sorry, this is a device, it does NOT belong in /sys/kernel/ > > And this really should be a real device, as I mentioned before, not a > kobject. Okay. I had to do this proposal to be sure (nobody answered my question in v1). Sorry. I'll make these into devices. USB Power Delivery shall be the device class for them. > > So now that pd0 can be linked to a device, or devices, that want (or > > can) use it to negotiate the USB PD contract with. An example where > > two devices share the PD: > > > > /sys/class/typec/port0/usb_power_delivery -> ../../../../../../../kernel/usb_power_delivery/pd0 > > /sys/class/typec/port1/usb_power_delivery -> ../../../../../../../kernel/usb_power_delivery/pd0 > > Point to the pd device, not the kobject. > > > I did not change the directory hierarchy at all, because I'm assuming > > that it is not a problem anymore: > > > > pd0/// > > Let's get back to devices first, worry about crazy depth second. Thanks, -- heikki