瀏覽代碼

extcon: Introduce EXTCON_PROP_USB_SS property for SuperSpeed mode

EXTCON_PROP_USB_SS (SuperSpeed)[1] is necessary to distinguish
between USB/USB2 and USB3 connections on USB Type-C cables.

[1] https://en.wikipedia.org/wiki/USB#Overview

Cc: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Guenter Roeck 9 年之前
父節點
當前提交
8457a1b49a
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      include/linux/extcon.h

+ 7 - 1
include/linux/extcon.h

@@ -109,12 +109,18 @@
  * @type:	integer (intval)
  * @type:	integer (intval)
  * @value:	0 (normal) or 1 (flip)
  * @value:	0 (normal) or 1 (flip)
  * @default:	0 (normal)
  * @default:	0 (normal)
+ * - EXTCON_PROP_USB_SS (SuperSpeed)
+ * @type:       integer (intval)
+ * @value:      0 (USB/USB2) or 1 (USB3)
+ * @default:    0 (USB/USB2)
+ *
  */
  */
 #define EXTCON_PROP_USB_VBUS		0
 #define EXTCON_PROP_USB_VBUS		0
 #define EXTCON_PROP_USB_TYPEC_POLARITY	1
 #define EXTCON_PROP_USB_TYPEC_POLARITY	1
+#define EXTCON_PROP_USB_SS		2
 
 
 #define EXTCON_PROP_USB_MIN		0
 #define EXTCON_PROP_USB_MIN		0
-#define EXTCON_PROP_USB_MAX		1
+#define EXTCON_PROP_USB_MAX		2
 #define EXTCON_PROP_USB_CNT	(EXTCON_PROP_USB_MAX - EXTCON_PROP_USB_MIN + 1)
 #define EXTCON_PROP_USB_CNT	(EXTCON_PROP_USB_MAX - EXTCON_PROP_USB_MIN + 1)
 
 
 /* Properties of EXTCON_TYPE_CHG. */
 /* Properties of EXTCON_TYPE_CHG. */