mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: linux-kernel@vger.kernel.org
Cc: cw00.choi@samsung.com, myungjoo.ham@samsung.com,
	zyw@rock-chips.com, groeck@chromium.org, rogerq@ti.com,
	chanwoo@kernel.org
Subject: [PATCH v3 6/6] extcon: Add EXTCON_DISP_DP and the property for USB Type-C
Date: Tue, 02 Aug 2016 10:58:25 +0900	[thread overview]
Message-ID: <1470103105-5992-7-git-send-email-cw00.choi@samsung.com> (raw)
In-Reply-To: <1470103105-5992-1-git-send-email-cw00.choi@samsung.com>

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>
Tested-by: Chris Zhong <zyw@rock-chips.com>
Tested-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
---
 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 b9290ab90fcd..4e7ef66543f6 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 664db79940b4..950f8491fa6a 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 + 1)
 
 /* Properties of EXTCON_TYPE_CHG. */
-- 
1.9.1

      parent reply	other threads:[~2016-08-02  1:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02  1:58 [PATCH v3 0/6] extcon: Add the support for extcon type and property Chanwoo Choi
2016-08-02  1:58 ` [PATCH v3 1/6] extcon: Add the extcon_type to gather each connector into five category Chanwoo Choi
2016-08-02  7:27   ` Roger Quadros
2016-08-02  7:41     ` Chanwoo Choi
2016-08-02  1:58 ` [PATCH v3 2/6] extcon: Add the support for extcon property according to extcon type Chanwoo Choi
2016-08-02  7:43   ` Roger Quadros
2016-08-02  8:08     ` Chanwoo Choi
2016-08-03  9:46       ` Roger Quadros
2016-08-04  0:42         ` Chanwoo Choi
2016-08-04  4:09           ` Guenter Roeck
2016-08-04  8:49             ` Roger Quadros
2016-08-04 10:57               ` Chanwoo Choi
2016-08-04 14:47                 ` Guenter Roeck
2016-08-05  0:33                   ` Chanwoo Choi
2016-08-02  1:58 ` [PATCH v3 3/6] extcon: Add the support for the capability of each property Chanwoo Choi
2016-08-02  8:07   ` Roger Quadros
2016-08-02  8:18     ` Chanwoo Choi
2016-08-02  1:58 ` [PATCH v3 4/6] extcon: Rename the extcon_set/get_state() to maintain the function naming pattern Chanwoo Choi
2016-08-02  1:58 ` [PATCH v3 5/6] extcon: Add the synchronization extcon APIs to support the notification Chanwoo Choi
2016-08-02  1:58 ` Chanwoo Choi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470103105-5992-7-git-send-email-cw00.choi@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=chanwoo@kernel.org \
    --cc=groeck@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=rogerq@ti.com \
    --cc=zyw@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®