OSDN Git Service

extcon: Add support for USB connector speed
authorHemant Kumar <hemantk@codeaurora.org>
Thu, 19 May 2016 20:56:25 +0000 (13:56 -0700)
committerKyle Yan <kyan@codeaurora.org>
Wed, 25 May 2016 00:55:03 +0000 (17:55 -0700)
This allows extcon to notify the USB controller driver
to enumerate host/peripheral in high or super speed mode.

Change-Id: I425087a02b680a5a1bc0579fd4d1410eb92d8e4c
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
drivers/extcon/extcon.c
include/linux/extcon.h

index ca1095b..db8f0ee 100644 (file)
@@ -66,6 +66,9 @@ static const char *extcon_name[] =  {
        /* connector orientation 0 - CC1, 1 - CC2 */
        [EXTCON_USB_CC]                 = "USB-CC",
 
+       /* connector speed 0 - High Speed, 1 - Super Speed */
+       [EXTCON_USB_SPEED]              = "USB-SPEED",
+
        /* Display external connector */
        [EXTCON_DISP_HDMI]              = "HDMI",
        [EXTCON_DISP_MHL]               = "MHL",
index faf9ae7..e136019 100644 (file)
@@ -58,6 +58,9 @@
 /* connector orientation 0 - CC1, 1 - CC2 */
 #define EXTCON_USB_CC          28
 
+/* connector speed 0 - High Speed, 1 - super speed */
+#define EXTCON_USB_SPEED       29
+
 /* Display external connector */
 #define EXTCON_DISP_HDMI       40      /* High-Definition Multimedia Interface */
 #define EXTCON_DISP_MHL                41      /* Mobile High-Definition Link */