From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752838AbcF1M0i (ORCPT ); Tue, 28 Jun 2016 08:26:38 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:34202 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752614AbcF1M0g (ORCPT ); Tue, 28 Jun 2016 08:26:36 -0400 MIME-Version: 1.0 Reply-To: cw00.choi@samsung.com In-Reply-To: <1466686264-6744-2-git-send-email-zyw@rock-chips.com> References: <1466686264-6744-1-git-send-email-zyw@rock-chips.com> <1466686264-6744-2-git-send-email-zyw@rock-chips.com> From: Chanwoo Choi Date: Tue, 28 Jun 2016 21:26:35 +0900 Message-ID: Subject: Re: [v3 PATCH 1/5] extcon: Add Type-C and DP support To: Chris Zhong Cc: Douglas Anderson , tfiga@chromium.org, =?UTF-8?Q?Heiko_St=C3=BCbner?= , yzq@rock-chips.com, groeck@chromium.org, "myungjoo.ham@samsung.com" , linux-rockchip@lists.infradead.org, linux-kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chris, I agree to add the new EXTCON_DISP_DP connector. But, other new definition should be discussed. - EXTCON_DISP_DP_ALT - EXTCON_TYPEC_POLARITY - EXTCON_TYPEC_PIN_ASSIGN I think that TYPEC_POLARITY and TYPEC_PIN_ASSING are not appropriate as the new external connector definition. These are the property or attribute of USB connector with C-type. Also, EXTCON_DISP_DP_ALT is not a new type of connector. It is just one of the mode for DP connector. As I knew, DP alternative mode use the USB connector with C-type. So, DP alternative mode can be expressed on following: = EXTCON_DISP_DP + EXTCON_USB + some property of USB c-type Thanks, Chanwoo Choi 2016-06-23 21:51 GMT+09:00 Chris Zhong : > Add EXTCON_DISP_DP and EXTCON_DISP_DP_ALT for the Display external > connector. The EXTCON_DISP_DP is for DisplayPort, and the > EXTCON_DISP_DP_ALT is the DisplayPort as an Alternate Mode for > the USB Type-C connector (VESA DisplayPort Alt Mode on USB Type-C > Standard). > > And for the Type-C USB, there is some information need to be supplied > by PowerDelivery or other mode detecter: port orientation and pin > assignments, so add these 2 virtual cable: EXTCON_TYPEC_POLARITY > and EXTCON_TYPEC_PIN_ASSIGN. If EXTCON_TYPEC_POLARITY is attached, > the Type-C get flip orientation. IF EXTCON_TYPEC_PIN_ASSIGN is > attached, Type-C get Pin_Assignment_C(for DP only mode) or > Pin_Assignment_D(for DP alt mode), the default Assignment is A or B. > > Signed-off-by: Chris Zhong > --- > > Changes in v3: None > Changes in v2: None > Changes in v1: None > > drivers/extcon/extcon.c | 6 ++++++ > include/linux/extcon.h | 6 ++++++ > 2 files changed, 12 insertions(+) > > diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c > index 21a123c..0522b4d 100644 > --- a/drivers/extcon/extcon.c > +++ b/drivers/extcon/extcon.c > @@ -53,6 +53,10 @@ static const char *extcon_name[] = { > [EXTCON_CHG_USB_FAST] = "FAST-CHARGER", > [EXTCON_CHG_USB_SLOW] = "SLOW-CHARGER", > > + /* Type-c connector */ > + [EXTCON_TYPEC_POLARITY] = "TYPE-C-POLARITY", > + [EXTCON_TYPEC_PIN_ASSIGN] = "TYPE-C-PIN-ASSIGN", > + > /* Jack external connector */ > [EXTCON_JACK_MICROPHONE] = "MICROPHONE", > [EXTCON_JACK_HEADPHONE] = "HEADPHONE", > @@ -68,6 +72,8 @@ static const char *extcon_name[] = { > [EXTCON_DISP_MHL] = "MHL", > [EXTCON_DISP_DVI] = "DVI", > [EXTCON_DISP_VGA] = "VGA", > + [EXTCON_DISP_DP] = "DP", > + [EXTCON_DISP_DP_ALT] = "DP-ALT", > > /* Miscellaneous external connector */ > [EXTCON_DOCK] = "DOCK", > diff --git a/include/linux/extcon.h b/include/linux/extcon.h > index 7abf674..98039ad 100644 > --- a/include/linux/extcon.h > +++ b/include/linux/extcon.h > @@ -45,6 +45,10 @@ > #define EXTCON_CHG_USB_FAST 9 > #define EXTCON_CHG_USB_SLOW 10 > > +/* Type-c connector */ > +#define EXTCON_TYPEC_POLARITY 11 /* Typec-C plug orientation */ > +#define EXTCON_TYPEC_PIN_ASSIGN 12 /* Typec-C pin Assignment */ > + > /* Jack external connector */ > #define EXTCON_JACK_MICROPHONE 20 > #define EXTCON_JACK_HEADPHONE 21 > @@ -60,6 +64,8 @@ > #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 */ > +#define EXTCON_DISP_DP_ALT 45 /* Display Port Type-C Alternate Mode */ > > /* Miscellaneous external connector */ > #define EXTCON_DOCK 60 > -- > 2.6.3 >