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, chanwoo@kernel.org
Subject: [PATCH v2 6/6] extcon: Add EXTCON_DISP_DP and the property for USB Type-C
Date: Mon, 01 Aug 2016 14:50:54 +0900 [thread overview]
Message-ID: <1470030654-6641-7-git-send-email-cw00.choi@samsung.com> (raw)
In-Reply-To: <1470030654-6641-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>
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 680246cceb62..6ad966adec43 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 f686204fb4c7..9670d3f6bc32 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
next prev parent reply other threads:[~2016-08-01 5:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-01 5:50 [PATCH v2 0/6] extcon: Add the support for extcon type and property Chanwoo Choi
2016-08-01 5:50 ` [PATCH v2 1/6] extcon: Add the extcon_type to gather each connector into five category Chanwoo Choi
2016-08-01 19:44 ` Guenter Roeck
2016-08-01 5:50 ` [PATCH v2 2/6] extcon: Add the support for extcon property according to extcon type Chanwoo Choi
2016-08-01 19:48 ` Guenter Roeck
2016-08-02 1:27 ` Chanwoo Choi
2016-08-01 5:50 ` [PATCH v2 3/6] extcon: Add the support for the capability of each property Chanwoo Choi
2016-08-01 19:49 ` Guenter Roeck
2016-08-01 5:50 ` [PATCH v2 4/6] extcon: Rename the extcon_set/get_state() to maintain the function naming pattern Chanwoo Choi
2016-08-01 19:51 ` Guenter Roeck
2016-08-01 5:50 ` [PATCH v2 5/6] extcon: Add the synchronization extcon APIs to support the notification Chanwoo Choi
2016-08-01 19:55 ` Guenter Roeck
2016-08-02 1:50 ` Chanwoo Choi
2016-08-01 5:50 ` Chanwoo Choi [this message]
2016-08-01 18:18 ` [PATCH v2 0/6] extcon: Add the support for extcon type and property Guenter Roeck
2016-08-02 1:52 ` Chanwoo Choi
2016-08-02 4:51 ` Guenter Roeck
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=1470030654-6641-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=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®