]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/usb/typec/class.c
usb: typec: function for checking cable plug orientation
[linux.git] / drivers / usb / typec / class.c
index 633105917fa66e2c1c4662d551809c09dde1ddb1..3ef7b99b080f6809b7981eb032cd6019f0a9fe07 100644 (file)
@@ -1329,6 +1329,18 @@ int typec_set_orientation(struct typec_port *port,
 }
 EXPORT_SYMBOL_GPL(typec_set_orientation);
 
+/**
+ * typec_get_orientation - Get USB Type-C cable plug orientation
+ * @port: USB Type-C Port
+ *
+ * Get current cable plug orientation for @port.
+ */
+enum typec_orientation typec_get_orientation(struct typec_port *port)
+{
+       return port->orientation;
+}
+EXPORT_SYMBOL_GPL(typec_get_orientation);
+
 /**
  * typec_set_mode - Set mode of operation for USB Type-C connector
  * @port: USB Type-C port for the connector