From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Benson Leung <bleung@google.com>,
Prashant Malani <pmalani@chromium.org>,
Jameson Thies <jthies@google.com>,
"Regupathy, Rajaram" <rajaram.regupathy@intel.com>,
Guenter Roeck <linux@roeck-us.net>,
Won Chung <wonchung@google.com>,
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
Date: Wed, 13 Apr 2022 10:19:27 +0300 [thread overview]
Message-ID: <YlZ5f0CnTO6Enr78@kuha.fi.intel.com> (raw)
In-Reply-To: <YlWO6UbZ8zM4f6b6@kroah.com>
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/<message>/<object>/<field>
>
> Let's get back to devices first, worry about crazy depth second.
Thanks,
--
heikki
prev parent reply other threads:[~2022-04-13 7:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-12 13:00 [PATCH v2 0/3] usb: typec: Separate sysfs directory for all USB PD objects Heikki Krogerus
2022-04-12 13:00 ` [PATCH v2 1/3] usb: typec: Separate USB Power Delivery from USB Type-C Heikki Krogerus
2022-04-12 13:00 ` [PATCH v2 2/3] usb: typec: USB Power Deliver helpers for ports and partners Heikki Krogerus
2022-04-12 15:35 ` kernel test robot
2022-04-12 16:16 ` kernel test robot
2022-04-12 17:24 ` kernel test robot
2022-04-12 13:00 ` [PATCH v2 3/3] usb: typec: tcpm: Register USB Power Delivery Capabilities Heikki Krogerus
2022-04-12 14:38 ` [PATCH v2 0/3] usb: typec: Separate sysfs directory for all USB PD objects Greg Kroah-Hartman
2022-04-13 7:19 ` Heikki Krogerus [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YlZ5f0CnTO6Enr78@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=bleung@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=jthies@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=pmalani@chromium.org \
--cc=rajaram.regupathy@intel.com \
--cc=wonchung@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).