From d920806870fdb511b977c9f9ac65883d8b33b73e Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Thu, 19 May 2016 13:56:25 -0700 Subject: [PATCH] extcon: Add support for USB connector speed 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 --- drivers/extcon/extcon.c | 3 +++ include/linux/extcon.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c index ca1095b7b552..db8f0eeca7c9 100644 --- a/drivers/extcon/extcon.c +++ b/drivers/extcon/extcon.c @@ -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", diff --git a/include/linux/extcon.h b/include/linux/extcon.h index faf9ae79ca3c..e1360198955a 100644 --- a/include/linux/extcon.h +++ b/include/linux/extcon.h @@ -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 */