All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Zhong <zyw@rock-chips.com>
To: dianders@chromium.org, tfiga@chromium.org, heiko@sntech.de,
	yzq@rock-chips.com, groeck@chromium.org,
	myungjoo.ham@samsung.com, cw00.choi@samsung.com,
	wulf@rock-chips.com, marcheu@chromium.org
Cc: linux-rockchip@lists.infradead.org,
	Chris Zhong <zyw@rock-chips.com>,
	linux-kernel@vger.kernel.org
Subject: [v7 PATCH 1/6] extcon: Add EXTCON_DISP_DP and the property for USB Type-C
Date: Wed, 27 Jul 2016 21:07:11 +0800	[thread overview]
Message-ID: <1469624836-22792-2-git-send-email-zyw@rock-chips.com> (raw)
In-Reply-To: <1469624836-22792-1-git-send-email-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>
---

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
Changes in v1: None

 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 68890bb..6c7488a 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 f686204..9670d3f 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. */
-- 
2.6.3

  reply	other threads:[~2016-07-27 13:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27 13:07 [v7 PATCH 0/6] Rockchip Type-C and DisplayPort driver Chris Zhong
2016-07-27 13:07 ` Chris Zhong
2016-07-27 13:07 ` Chris Zhong
2016-07-27 13:07 ` Chris Zhong [this message]
2016-07-27 21:31   ` [v7 PATCH 1/6] extcon: Add EXTCON_DISP_DP and the property for USB Type-C Guenter Roeck
2016-07-27 13:07 ` [v7 PATCH 2/6] Documentation: bindings: add dt doc for Rockchip USB Type-C PHY Chris Zhong
2016-07-27 13:07   ` Chris Zhong
2016-07-27 13:07 ` [v7 PATCH 3/6] phy: Add USB Type-C PHY driver for rk3399 Chris Zhong
2016-07-27 13:07   ` Chris Zhong
2016-07-27 21:47   ` Guenter Roeck
2016-07-27 21:47     ` Guenter Roeck
2016-07-27 13:07 ` [v7 PATCH 4/6] arm64: dts: rockchip: add Type-C phy for RK3399 Chris Zhong
2016-07-27 13:07   ` Chris Zhong
2016-07-27 21:50   ` Guenter Roeck
2016-07-27 21:50     ` Guenter Roeck
2016-07-27 13:07 ` [v7 PATCH 5/6] Documentation: bindings: add dt documentation for cdn DP controller Chris Zhong
2016-07-27 13:07   ` Chris Zhong
2016-07-27 13:07   ` Chris Zhong
2016-07-27 13:07 ` [v7 PATCH 6/6] drm/rockchip: cdn-dp: add cdn DP support for rk3399 Chris Zhong
2016-07-27 13:07   ` Chris Zhong
2016-07-27 13:07   ` Chris Zhong
2016-07-27 22:24   ` Guenter Roeck
2016-07-27 22:24     ` 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=1469624836-22792-2-git-send-email-zyw@rock-chips.com \
    --to=zyw@rock-chips.com \
    --cc=cw00.choi@samsung.com \
    --cc=dianders@chromium.org \
    --cc=groeck@chromium.org \
    --cc=heiko@sntech.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=marcheu@chromium.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=tfiga@chromium.org \
    --cc=wulf@rock-chips.com \
    --cc=yzq@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.