diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2019-12-30 17:26:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-09 10:50:47 +0100 |
commit | 0f37a607091c30c2270d9065e8808a7d6ff34646 (patch) | |
tree | 65d429e080fcbb8f41e96994fa27a5d15c480cbf | |
parent | 87e3daa005cfba19433b5429bfbca9b848925507 (diff) |
usb: typec: Provide definitions for the USB modes
Defining the USB modes from the latest USB Power Delivery
Specification - USB 2.0, USB 3.2 and USB4 - as special modal
states just like the Accessory Modes.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20191230142611.24921-14-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | include/linux/usb/typec_altmode.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/usb/typec_altmode.h b/include/linux/usb/typec_altmode.h index fc57fd88004f..923ff3af0628 100644 --- a/include/linux/usb/typec_altmode.h +++ b/include/linux/usb/typec_altmode.h @@ -101,6 +101,22 @@ enum { TYPEC_MODE_DEBUG, /* Debug Accessory */ }; +/* + * USB4 also requires that the pins on the connector are repurposed, just like + * Alternate Modes. USB4 mode is however not entered with the Enter Mode Command + * like the Alternate Modes are, but instead with a special Enter_USB Message. + * The Enter_USB Message can also be used for setting to connector to operate in + * USB 3.2 or in USB 2.0 mode instead of USB4. + * + * The Enter_USB specific "USB Modes" are also supplied here as special modal + * state values, just like the Accessory Modes. + */ +enum { + TYPEC_MODE_USB2 = TYPEC_MODE_DEBUG, /* USB 2.0 mode */ + TYPEC_MODE_USB3, /* USB 3.2 mode */ + TYPEC_MODE_USB4 /* USB4 mode */ +}; + #define TYPEC_MODAL_STATE(_state_) ((_state_) + TYPEC_STATE_MODAL) struct typec_altmode *typec_altmode_get_plug(struct typec_altmode *altmode, |