From: RD Babiera <rdbabiera@google.com>
Cc: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org,
badhri@google.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, RD Babiera <rdbabiera@google.com>
Subject: [PATCH v2 0/2] usb: typec: altmodes/displayport: add port data role handling support
Date: Tue, 23 Sep 2025 18:16:06 +0000 [thread overview]
Message-ID: <20250923181606.1583584-4-rdbabiera@google.com> (raw)
This patchset adds support for Type-C PD altmodes drivers to query the port
data role using typec_altmode_get_data_role which requires a new symbol
typec_get_data_role. The UFP is not allowed to send the Enter Mode command,
so Alt Mode drivers can use this check to prevent driver registration
during the probe sequence.
The DisplayPort Alt Mode driver queries for the port data role during the
probe sequence and exits if the port is the UFP. If a data role swap were
initiated, the driver would be unregistered anyways so it is not necessary
to keep it alive.
Changes in v2:
* fixed typec_altmode_get_data_role documentation styling
RD Babiera (2):
usb: typec: class: add typec_get_data_role symbol
usb: typec: altmodes/displayport: do not enter mode if port is the UFP
drivers/usb/typec/altmodes/displayport.c | 4 +++-
drivers/usb/typec/class.c | 13 +++++++++++++
include/linux/usb/typec.h | 1 +
include/linux/usb/typec_altmode.h | 13 +++++++++++++
4 files changed, 30 insertions(+), 1 deletion(-)
base-commit: a4e143636d5def935dd461539b67b61287a8dfef
--
2.51.0.534.gc79095c0ca-goog
next reply other threads:[~2025-09-23 18:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 18:16 RD Babiera [this message]
2025-09-23 18:16 ` [PATCH v2 1/2] usb: typec: class: add typec_get_data_role symbol RD Babiera
2025-10-08 10:32 ` Heikki Krogerus
2025-09-23 18:16 ` [PATCH v2 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP RD Babiera
2025-10-08 10:33 ` Heikki Krogerus
2026-01-10 7:53 ` Andy Yan
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=20250923181606.1583584-4-rdbabiera@google.com \
--to=rdbabiera@google.com \
--cc=badhri@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.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