From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Guenter Roeck <linux@roeck-us.net>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v6 0/4] usb: Linking ports to their Type-C connectors
Date: Wed, 7 Apr 2021 09:55:51 +0300 [thread overview]
Message-ID: <20210407065555.88110-1-heikki.krogerus@linux.intel.com> (raw)
Hi,
These are the remaining four patches of the series, now rebased on top
of the latest usb-next. No other changes.
v5 cover letter:
I have to use IS_REACHABLE() instead of IS_ENABLED() also in
include/linux/usb.h. Otherwise compilation will fail if the Type-C
class is build-in while USB is a module.
I'm sorry for re-sending these so fast, immediately after v4. Normally
I would wait, but I'll be taking a short vacation starting from right
now, and I'm still hoping to get these into v5.13.
v4 cover letter:
One more version. I used #ifdef when I should have used #if
IS_DEFINED(). Thanks Guenter for pointing that out.
I'm sending this version right away because of the holidays. I'm not
changing anything else except that one fix.
v3: cover letter:
Third version: ifdefs now in the header files as they should be.
v2 cover letter:
This is the second version of this series. The "Iterator for ports"
patch is now moved to the end of the series (5/6).
I'm now using usb_for_each_dev() in usb_for_each_port like Alan
suggested, and I'm now using usb_port_peer_mutex to lock the ports
while we're dealing with them in __each_hub().
The original cover letter:
Adding a simple function typec_link_port() that can be used to create
a symlink "connector" that points to the USB Type-C connector of a
port. It is used with USB ports initially, but hopefully later also
with other things like DisplayPorts.
Being able to see which connector is connected to a port is important
in general, but it is really important when for example the data or
power role of a device needs to swapped. The user probable wants to
know which USB device is disconnected if role swap on a USB Type-C
connector is executed.
Hope these are OK.
thanks,
Heikki Krogerus (4):
usb: typec: Port mapping utility
usb: Link the ports to the connectors they are attached to
usb: Iterator for ports
usb: typec: Link all ports during connector registration
Documentation/ABI/testing/sysfs-bus-usb | 9 +
drivers/usb/core/port.c | 3 +
drivers/usb/core/usb.c | 46 ++++
drivers/usb/typec/Makefile | 2 +-
drivers/usb/typec/class.c | 12 +-
drivers/usb/typec/class.h | 9 +
drivers/usb/typec/port-mapper.c | 277 ++++++++++++++++++++++++
include/linux/usb.h | 9 +
include/linux/usb/typec.h | 13 ++
9 files changed, 377 insertions(+), 3 deletions(-)
create mode 100644 drivers/usb/typec/port-mapper.c
--
2.30.2
next reply other threads:[~2021-04-07 6:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-07 6:55 Heikki Krogerus [this message]
2021-04-07 6:55 ` [PATCH v6 1/4] usb: typec: Port mapping utility Heikki Krogerus
2021-04-07 6:55 ` [PATCH v6 2/4] usb: Link the ports to the connectors they are attached to Heikki Krogerus
2021-10-13 20:28 ` Prashant Malani
2021-10-13 20:57 ` Guenter Roeck
2021-10-13 21:16 ` Prashant Malani
2021-10-15 7:44 ` Heikki Krogerus
2021-04-07 6:55 ` [PATCH v6 3/4] usb: Iterator for ports Heikki Krogerus
2021-04-07 6:55 ` [PATCH v6 4/4] usb: typec: Link all ports during connector registration Heikki Krogerus
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=20210407065555.88110-1-heikki.krogerus@linux.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=stern@rowland.harvard.edu \
/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