aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/typec.h
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2018-06-27 18:19:50 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-02 17:42:36 +0200
commit8a37d87d72f0c69f837229c04d2fcd7117ea57e7 (patch)
tree43cf3111a964678d08fe6638e4459e1c2db50b55 /include/linux/usb/typec.h
parentusb: typec: Register a device for every mode (diff)
downloadlinux-dev-8a37d87d72f0c69f837229c04d2fcd7117ea57e7.tar.xz
linux-dev-8a37d87d72f0c69f837229c04d2fcd7117ea57e7.zip
usb: typec: Bus type for alternate modes
Introducing a simple bus for the alternate modes. Bus allows binding drivers to the discovered alternate modes the partners support. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb/typec.h')
-rw-r--r--include/linux/usb/typec.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h
index 2dcb1683075f..7df4ecabc78a 100644
--- a/include/linux/usb/typec.h
+++ b/include/linux/usb/typec.h
@@ -5,21 +5,18 @@
#include <linux/types.h>
-/* XXX: Once we have a header for USB Power Delivery, this belongs there */
-#define ALTMODE_MAX_MODES 6
-
/* USB Type-C Specification releases */
#define USB_TYPEC_REV_1_0 0x100 /* 1.0 */
#define USB_TYPEC_REV_1_1 0x110 /* 1.1 */
#define USB_TYPEC_REV_1_2 0x120 /* 1.2 */
-struct typec_altmode;
struct typec_partner;
struct typec_cable;
struct typec_plug;
struct typec_port;
struct fwnode_handle;
+struct device;
enum typec_port_type {
TYPEC_PORT_SRC,
@@ -107,7 +104,7 @@ struct typec_altmode_desc {
u8 mode;
u32 vdo;
/* Only used with ports */
- enum typec_port_type roles;
+ enum typec_port_data roles;
};
struct typec_altmode
@@ -186,7 +183,6 @@ struct typec_partner_desc {
* @dr_set: Set Data Role
* @pr_set: Set Power Role
* @vconn_set: Set VCONN Role
- * @activate_mode: Enter/exit given Alternate Mode
* @port_type_set: Set port type
*
* Static capabilities of a single USB Type-C port.
@@ -212,12 +208,8 @@ struct typec_capability {
enum typec_role);
int (*vconn_set)(const struct typec_capability *,
enum typec_role);
-
- int (*activate_mode)(const struct typec_capability *,
- int mode, int activate);
int (*port_type_set)(const struct typec_capability *,
- enum typec_port_type);
-
+ enum typec_port_type);
};
/* Specific to try_role(). Indicates the user want's to clear the preference. */