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>,
Guenter Roeck <linux@roeck-us.net>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/6] usb: Linking ports to their Type-C connectors
Date: Thu, 25 Mar 2021 15:29:20 +0300 [thread overview]
Message-ID: <20210325122926.58392-1-heikki.krogerus@linux.intel.com> (raw)
Hi,
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 (6):
usb: Iterator for ports
usb: typec: Organize the private headers properly
usb: typec: Declare the typec_class static
usb: typec: Port mapping utility
usb: Link the ports to the connectors they are attached to
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 | 43 ++++
drivers/usb/typec/Makefile | 1 +
drivers/usb/typec/bus.c | 2 +
drivers/usb/typec/bus.h | 19 +-
drivers/usb/typec/class.c | 101 +++------
drivers/usb/typec/class.h | 94 ++++++++
drivers/usb/typec/mux.c | 4 +-
drivers/usb/typec/mux.h | 21 ++
drivers/usb/typec/port-mapper.c | 283 ++++++++++++++++++++++++
include/linux/usb.h | 1 +
include/linux/usb/typec.h | 13 ++
13 files changed, 499 insertions(+), 95 deletions(-)
create mode 100644 drivers/usb/typec/class.h
create mode 100644 drivers/usb/typec/mux.h
create mode 100644 drivers/usb/typec/port-mapper.c
--
2.30.2
next reply other threads:[~2021-03-25 12:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 12:29 Heikki Krogerus [this message]
2021-03-25 12:29 ` [PATCH 1/6] usb: Iterator for ports Heikki Krogerus
2021-03-25 14:41 ` Alan Stern
2021-03-25 15:14 ` Heikki Krogerus
2021-03-25 15:20 ` Greg Kroah-Hartman
2021-03-25 15:33 ` Heikki Krogerus
2021-03-25 15:23 ` Heikki Krogerus
2021-03-25 15:31 ` Alan Stern
2021-03-25 12:29 ` [PATCH 2/6] usb: typec: Organize the private headers properly Heikki Krogerus
2021-03-25 12:29 ` [PATCH 3/6] usb: typec: Declare the typec_class static Heikki Krogerus
2021-03-25 12:29 ` [PATCH 4/6] usb: typec: Port mapping utility Heikki Krogerus
2021-03-25 12:29 ` [PATCH 5/6] usb: Link the ports to the connectors they are attached to Heikki Krogerus
2021-03-25 12:29 ` [PATCH 6/6] usb: typec: Link all ports during connector registration Heikki Krogerus
2021-03-25 19:10 ` kernel test robot
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=20210325122926.58392-1-heikki.krogerus@linux.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=bleung@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=pmalani@chromium.org \
/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).