aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2019-12-30 17:25:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-09 10:48:19 +0100
commitb66b40ee7d0d376a725fde2b6d951a37cb3062c6 (patch)
tree33e13602ba11d2c05987f1b20c827ca9ba8d8fa4 /include/linux/usb
parentusb: typec: Add parameter for the VDO to typec_altmode_enter() (diff)
downloadlinux-dev-b66b40ee7d0d376a725fde2b6d951a37cb3062c6.tar.xz
linux-dev-b66b40ee7d0d376a725fde2b6d951a37cb3062c6.zip
usb: typec: More API for cable handling
Thunderbolt 3, and probable USB4 too, will need to be able to get details about the cables. Adding typec_cable_get() function that the alternate mode drivers can use to gain access to gain access to the cable. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20191230142611.24921-4-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/typec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h
index 0f52723a11bd..d95ea0d398b8 100644
--- a/include/linux/usb/typec.h
+++ b/include/linux/usb/typec.h
@@ -230,6 +230,10 @@ struct typec_cable *typec_register_cable(struct typec_port *port,
struct typec_cable_desc *desc);
void typec_unregister_cable(struct typec_cable *cable);
+struct typec_cable *typec_cable_get(struct typec_port *port);
+void typec_cable_put(struct typec_cable *cable);
+int typec_cable_is_active(struct typec_cable *cable);
+
struct typec_plug *typec_register_plug(struct typec_cable *cable,
struct typec_plug_desc *desc);
void typec_unregister_plug(struct typec_plug *plug);