summaryrefslogtreecommitdiff
path: root/drivers/usb/typec/ucsi/ucsi.h
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2019-04-23 17:21:49 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-25 12:04:55 +0300
commitaf8622f6a585d8d82b11cd7987e082861fd0edd3 (patch)
treea483bafb5ea1762e6734754a9bf05ee4a4e6461e /drivers/usb/typec/ucsi/ucsi.h
parentad74b8649beaf1a22cf8641324e3321fa0269d16 (diff)
downloadlinux-af8622f6a585d8d82b11cd7987e082861fd0edd3.tar.xz
usb: typec: ucsi: Support for DisplayPort alt mode
This makes it possible to bind a driver to a DisplayPort alt mode adapter devices. The driver attempts to cope with the limitations of UCSI by "emulating" behaviour and attempting to guess things when ever possible in order to satisfy the requirements the standard DisplayPort alt mode driver has. Tested-by: Ajay Gupta <ajayg@nvidia.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/ucsi/ucsi.h')
-rw-r--r--drivers/usb/typec/ucsi/ucsi.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h
index 6cafa6b4a60a..1e2981aef629 100644
--- a/drivers/usb/typec/ucsi/ucsi.h
+++ b/drivers/usb/typec/ucsi/ucsi.h
@@ -431,4 +431,25 @@ int ucsi_send_command(struct ucsi *ucsi, struct ucsi_control *ctrl,
void ucsi_altmode_update_active(struct ucsi_connector *con);
+#if IS_ENABLED(CONFIG_TYPEC_DP_ALTMODE)
+struct typec_altmode *
+ucsi_register_displayport(struct ucsi_connector *con,
+ bool override, int offset,
+ struct typec_altmode_desc *desc);
+
+void ucsi_displayport_remove_partner(struct typec_altmode *adev);
+
+#else
+static inline struct typec_altmode *
+ucsi_register_displayport(struct ucsi_connector *con,
+ bool override, int offset,
+ struct typec_altmode_desc *desc)
+{
+ return NULL;
+}
+
+static inline void
+ucsi_displayport_remove_partner(struct typec_altmode *adev) { }
+#endif /* CONFIG_TYPEC_DP_ALTMODE */
+
#endif /* __DRIVER_USB_TYPEC_UCSI_H */