Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1450561

[PATCH 6/6] extcon: Add EXTCON_DISP_DP and the property for USB Type-C

From Chanwoo Choi <cw00.choi@samsung.com>
Newsgroups linux.kernel
Subject [PATCH 6/6] extcon: Add EXTCON_DISP_DP and the property for USB Type-C
Date 2016-07-26 14:20 +0200
Message-ID <rZ9v4-1PL-33@gated-at.bofh.it> (permalink)
References <rZ9v3-1PL-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Chris Zhong <zyw@rock-chips.com>

Add EXTCON_DISP_DP for the Display external connector. For Type-C
connector the DisplayPort can work as an Alternate Mode(VESA DisplayPort
Alt Mode on USB Type-C Standard). The Type-C support both normal
and flipped orientation, so add a property to extcon.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/extcon/extcon.c | 5 +++++
 include/linux/extcon.h  | 8 +++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 8572523bfd40..00711e811821 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -157,6 +157,11 @@ struct __extcon_info {
 		.id = EXTCON_DISP_VGA,
 		.name = "VGA",
 	},
+	[EXTCON_DISP_DP] = {
+		.type = EXTCON_TYPE_DISP | EXTCON_TYPE_USB,
+		.id = EXTCON_DISP_DP,
+		.name = "DP",
+	},
 
 	/* Miscellaneous external connector */
 	[EXTCON_DOCK] = {
diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index 00ab1180346c..2f4cde8c38d7 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -69,6 +69,7 @@
 #define EXTCON_DISP_MHL		41	/* Mobile High-Definition Link */
 #define EXTCON_DISP_DVI		42	/* Digital Visual Interface */
 #define EXTCON_DISP_VGA		43	/* Video Graphics Array */
+#define EXTCON_DISP_DP		44	/* Display Port */
 
 /* Miscellaneous external connector */
 #define EXTCON_DOCK		60
@@ -106,12 +107,17 @@
  * @type:	integer (intval)
  * @value:	0 (low) or 1 (high)
  * @default:	0 (low)
+ * - EXTCON_PROP_USB_TYPEC_POLARITY
+ * @type:	integer (intval)
+ * @value:	0 (normal) or 1 (flip)
+ * @default:	0 (normal)
  */
 #define EXTCON_PROP_USB_ID		0
 #define EXTCON_PROP_USB_VBUS		1
+#define EXTCON_PROP_USB_TYPEC_POLARITY	2
 
 #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)
 
 /* Properties of EXTCON_TYPE_CHG. */
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] extcon: Add the support for extcon type and property Chanwoo Choi <cw00.choi@samsung.com> - 2016-07-26 14:20 +0200
  [PATCH 4/6] extcon: Rename the extcon_set/get_state() to maintain the  function naming pattern Chanwoo Choi <cw00.choi@samsung.com> - 2016-07-26 14:20 +0200
  [PATCH 5/6] extcon: Add the synchronization extcon APIs to support the  notification Chanwoo Choi <cw00.choi@samsung.com> - 2016-07-26 14:20 +0200
    Re: [PATCH 5/6] extcon: Add the synchronization extcon APIs to  support the notification Chris Zhong <zyw@rock-chips.com> - 2016-07-27 09:40 +0200
      Re: [PATCH 5/6] extcon: Add the synchronization extcon APIs to support  the notification Chanwoo Choi <cw00.choi@samsung.com> - 2016-07-27 09:50 +0200
  [PATCH 1/6] extcon: Add the extcon_type to group each connector into  five category Chanwoo Choi <cw00.choi@samsung.com> - 2016-07-26 14:20 +0200
  [PATCH 3/6] extcon: Add the support for the capability of each property Chanwoo Choi <cw00.choi@samsung.com> - 2016-07-26 14:20 +0200
  [PATCH 6/6] extcon: Add EXTCON_DISP_DP and the property for USB Type-C Chanwoo Choi <cw00.choi@samsung.com> - 2016-07-26 14:20 +0200
  RE: [PATCH 1/6] extcon: Add the extcon_type to group each connector into five category MyungJoo Ham <myungjoo.ham@samsung.com> - 2016-07-27 06:30 +0200
    Re: [PATCH 1/6] extcon: Add the extcon_type to group each connector  into five category Chanwoo Choi <cw00.choi@samsung.com> - 2016-07-27 07:40 +0200

csiph-web