linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] usb: typec: altmodes/displayport: add port data role handling support
@ 2025-08-21 20:38 RD Babiera
  2025-08-21 20:38 ` [PATCH v1 1/2] usb: typec: class: add typec_get_data_role symbol RD Babiera
  2025-08-21 20:38 ` [PATCH v1 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP RD Babiera
  0 siblings, 2 replies; 5+ messages in thread
From: RD Babiera @ 2025-08-21 20:38 UTC (permalink / raw)
  Cc: heikki.krogerus, gregkh, badhri, linux-usb, linux-kernel,
	RD Babiera

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.

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        | 12 ++++++++++++
 4 files changed, 29 insertions(+), 1 deletion(-)


base-commit: 956606bafb5fc6e5968aadcda86fc0037e1d7548
-- 
2.51.0.261.g7ce5a0a67e-goog


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-09-03 16:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-21 20:38 [PATCH v1 0/2] usb: typec: altmodes/displayport: add port data role handling support RD Babiera
2025-08-21 20:38 ` [PATCH v1 1/2] usb: typec: class: add typec_get_data_role symbol RD Babiera
2025-08-28  9:43   ` Heikki Krogerus
2025-09-03 16:47     ` RD Babiera
2025-08-21 20:38 ` [PATCH v1 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP RD Babiera

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).