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

RD Babiera posted 2 patches 1 week, 1 day ago
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(-)
[PATCH v2 0/2] usb: typec: altmodes/displayport: add port data role handling support
Posted by RD Babiera 1 week, 1 day ago
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