Skip to content

usb: typec: altmodes/displayport: add port data role handling support

RD Babiera linux-usb lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

* fixed typec_altmode_get_data_role documentation styling

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2usb: typec: class: add typec_get_data_role symboldrivers/usb/typec/class.c include/linux/usb/typec.h include/linux/usb/typec_altmode.h+27 -01 reply
2/2usb: typec: altmodes/displayport: do not enter mode if port is the UFPdrivers/usb/typec/altmodes/displayport.c+3 -12 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchHeikki Krogerus
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] usb: typec: altmodes/displayport: add port data role handling support

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

Signature · 1 line
2.51.0.534.gc79095c0ca-goog