All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: Chanwoo Choi <cwchoi00@gmail.com>, <linux-kernel@vger.kernel.org>
Cc: <k.kozlowski@samsung.com>, <ramakrishna.pallala@intel.com>,
	<gregkh@linuxfoundation.org>,
	<ckeepax@opensource.wolfsonmicro.com>,
	<rf@opensource.wolfsonmicro.com>,
	<patches@opensource.wolfsonmicro.com>, <cw00.choi@samsung.com>,
	<myungjoo.ham@samsung.com>
Subject: Re: [PATCH] extcon: Modify the id and name of external connector
Date: Mon, 5 Oct 2015 11:26:15 +0300	[thread overview]
Message-ID: <56123427.2030702@ti.com> (raw)
In-Reply-To: <1443930336-25422-1-git-send-email-cw00.choi@samsung.com>

Chanwoo,

On 04/10/15 06:45, Chanwoo Choi wrote:
> This patch modifies the id and name of external connector with the additional
> prefix to clarify both attribute and meaning of external connector as following:
> - EXTCON_CHG_* mean the charger connector.
> - EXTCON_JACK_* mean the jack connector.
> - EXTCON_DISP_* mean the display port connector.
> 
> Following table show the new name of external connector with old name:
> -------------------------------------------------
> Old extcon name         | New extcon name       |
> -------------------------------------------------
> EXTCON_TA               | EXTCON_CHG_USB_DCP    |
> EXTCON_FAST_CHARGER     | EXTCON_CHG_USB_FAST   |
> EXTCON_SLOW_CHARGER     | EXTCON_CHG_USB_SLOW   |
> EXTCON_CHARGE_DOWNSTREAM| EXTCON_CHG_USB_CDP    |
> -------------------------------------------------
> EXTCON_MICROPHONE       | EXTCON_JACK_MICROPHONE|
> EXTCON_HEADPHONE        | EXTCON_JACK_HEADPHONE |
> EXTCON_LINE_IN          | EXTCON_JACK_LINE_IN   |
> EXTCON_LINE_OUT         | EXTCON_JACK_LINE_OUT  |
> EXTCON_VIDEO_IN         | EXTCON_JACK_VIDEO_IN  |
> EXTCON_VIDEO_OUT        | EXTCON_JACK_VIDEO_OUT |
> EXTCON_SPDIF_IN         | EXTCON_JACK_SPDIF_IN  |
> EXTCON_SPDIF_OUT        | EXTCON_JACK_SPDIF_OUT |
> -------------------------------------------------
> EXTCON_HMDI             | EXTCON_DISP_HDMI      |
> EXTCON_MHL              | EXTCON_DISP_MHL       |
> EXTCON_DVI              | EXTCON_DISP_DVI       |
> EXTCON_VGA              | EXTCON_DISP_VGA       |
> -------------------------------------------------
> 
> And, when altering the name of USB charger connector, EXTCON refers to the
> "USB battery charging specification"[1] to use the standard name of USB
> charging port as following. Following name of USB charging port are already used
> in power_supply subsystem. We chan check it on patch[2].
> - EXTCON_CHG_USB	/* Standard Downstream Port */
> - EXTCON_CHG_USB_DCP	/* Dedicated Charging Port */
> - EXTCON_CHG_USB_CDP	/* Charging Downstream Port */
> - EXTCON_CHG_USB_ACA	/* Accessory Charging Adapter */
> 
> [1] http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf
> [2] commit 85efc8a18ce ("[PATCH] power_supply: Add types for USB chargers")
> 
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>  drivers/extcon/extcon-arizona.c  | 18 ++++++------
>  drivers/extcon/extcon-axp288.c   | 12 ++++----
>  drivers/extcon/extcon-max14577.c | 18 ++++++------
>  drivers/extcon/extcon-max77693.c | 32 +++++++++++----------
>  drivers/extcon/extcon-max77843.c | 27 ++++++++++--------
>  drivers/extcon/extcon-max8997.c  | 21 +++++++-------
>  drivers/extcon/extcon-rt8973a.c  |  4 +--
>  drivers/extcon/extcon-sm5502.c   |  4 +--
>  drivers/extcon/extcon.c          | 60 ++++++++++++++++++++-------------------
>  include/linux/extcon.h           | 61 +++++++++++++++++++++++-----------------
>  10 files changed, 138 insertions(+), 119 deletions(-)
> 

<snip>

> diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
> index 8dd0af1..505a028 100644
> --- a/drivers/extcon/extcon.c
> +++ b/drivers/extcon/extcon.c
> @@ -39,37 +39,39 @@
>  #define CABLE_NAME_MAX		30
>  
>  static const char *extcon_name[] =  {
> -	[EXTCON_NONE]		= "NONE",
> +	[EXTCON_NONE]		= "EXTCON_NONE",
>  
>  	/* USB external connector */
> -	[EXTCON_USB]		= "USB",
> -	[EXTCON_USB_HOST]	= "USB-HOST",
> -
> -	/* Charger external connector */
> -	[EXTCON_TA]		= "TA",
> -	[EXTCON_FAST_CHARGER]	= "FAST-CHARGER",
> -	[EXTCON_SLOW_CHARGER]	= "SLOW-CHARGER",
> -	[EXTCON_CHARGE_DOWNSTREAM] = "CHARGE-DOWNSTREAM",
> -
> -	/* Audio/Video external connector */
> -	[EXTCON_LINE_IN]	= "LINE-IN",
> -	[EXTCON_LINE_OUT]	= "LINE-OUT",
> -	[EXTCON_MICROPHONE]	= "MICROPHONE",
> -	[EXTCON_HEADPHONE]	= "HEADPHONE",
> -
> -	[EXTCON_HDMI]		= "HDMI",
> -	[EXTCON_MHL]		= "MHL",
> -	[EXTCON_DVI]		= "DVI",
> -	[EXTCON_VGA]		= "VGA",
> -	[EXTCON_SPDIF_IN]	= "SPDIF-IN",
> -	[EXTCON_SPDIF_OUT]	= "SPDIF-OUT",
> -	[EXTCON_VIDEO_IN]	= "VIDEO-IN",
> -	[EXTCON_VIDEO_OUT]	= "VIDEO-OUT",
> -
> -	/* Etc external connector */
> -	[EXTCON_DOCK]		= "DOCK",
> -	[EXTCON_JIG]		= "JIG",
> -	[EXTCON_MECHANICAL]	= "MECHANICAL",
> +	[EXTCON_USB]		= "EXTCON_USB",
> +	[EXTCON_USB_HOST]	= "EXTCON_USB_HOST",
> +
> +	/* Charging external connector */
> +	[EXTCON_CHG_USB]	= "EXTCON_CHG_USB",
> +	[EXTCON_CHG_USB_FAST]	= "EXTCON_CHG_USB_FAST",
> +	[EXTCON_CHG_USB_SLOW]	= "EXTCON_CHG_USB_SLOW",

How does FAST & SLOW correlate to USB specifications?

> +	[EXTCON_CHG_USB_DCP]	= "EXTCON_CHG_USB_DCP",
> +	[EXTCON_CHG_USB_CDP]	= "EXTCON_CHG_USB_CDP",

What about USB ACA?

> +
> +	/* Jack external connector */
> +	[EXTCON_JACK_MICROPHONE] = "EXTCON_JACK_MICROPHONE",
> +	[EXTCON_JACK_HEADPHONE]	= "EXTCON_JACK_HEADPHONE",
> +	[EXTCON_JACK_LINE_IN]	= "EXTCON_JACK_LINE_IN",
> +	[EXTCON_JACK_LINE_OUT]	= "EXTCON_JACK_LINE_OUT",
> +	[EXTCON_JACK_VIDEO_IN]	= "EXTCON_JACK_VIDEO_IN",
> +	[EXTCON_JACK_VIDEO_OUT]	= "EXTCON_JACK_VIDEO_OUT",
> +	[EXTCON_JACK_SPDIF_IN]	= "EXTCON_JACK_SPDIF_IN",
> +	[EXTCON_JACK_SPDIF_OUT]	= "EXTCON_JACK_SPDIF_OUT",
> +
> +	/* Display external connector */
> +	[EXTCON_DISP_HDMI]	= "EXTCON_DISP_HDMI",
> +	[EXTCON_DISP_MHL]	= "EXTCON_DISP_MHL",
> +	[EXTCON_DISP_DVI]	= "EXTCON_DISP_DVI",
> +	[EXTCON_DISP_VGA]	= "EXTCON_DISP_VGA",
> +
> +	/* Miscellaneous external connector */
> +	[EXTCON_DOCK]		= "EXTCON_DOCK",
> +	[EXTCON_JIG]		= "EXTCON_JIG",
> +	[EXTCON_MECHANICAL]	= "EXTCON_MECHANICAL",
>  
>  	NULL,
>  };
> diff --git a/include/linux/extcon.h b/include/linux/extcon.h
> index c0f8c4f..6d5285c 100644
> --- a/include/linux/extcon.h
> +++ b/include/linux/extcon.h
> @@ -31,32 +31,41 @@
>  /*
>   * Define the unique id of supported external connectors
>   */
> -#define EXTCON_NONE			0
> -
> -#define EXTCON_USB			1	/* USB connector */
> -#define EXTCON_USB_HOST			2
> -
> -#define EXTCON_TA			3	/* Charger connector */
> -#define EXTCON_FAST_CHARGER		4
> -#define EXTCON_SLOW_CHARGER		5
> -#define EXTCON_CHARGE_DOWNSTREAM	6
> -
> -#define EXTCON_LINE_IN			7	/* Audio/Video connector */
> -#define EXTCON_LINE_OUT			8
> -#define EXTCON_MICROPHONE		9
> -#define EXTCON_HEADPHONE		10
> -#define EXTCON_HDMI			11
> -#define EXTCON_MHL			12
> -#define EXTCON_DVI			13
> -#define EXTCON_VGA			14
> -#define EXTCON_SPDIF_IN			15
> -#define EXTCON_SPDIF_OUT		16
> -#define EXTCON_VIDEO_IN			17
> -#define EXTCON_VIDEO_OUT		18
> -
> -#define EXTCON_DOCK			19	/* Misc connector */
> -#define EXTCON_JIG			20
> -#define EXTCON_MECHANICAL		21
> +#define EXTCON_NONE		0
> +
> +/* USB external connector */
> +#define EXTCON_USB		1	/* Universal Serial Bus */
> +#define EXTCON_USB_HOST		2
> +
> +/* Charging external connector */
> +#define EXTCON_CHG_USB		5	/* Standard Downstream Port */
> +#define EXTCON_CHG_USB_FAST	6
> +#define EXTCON_CHG_USB_SLOW	7
> +#define EXTCON_CHG_USB_DCP	8	/* Dedicated Charging Port */
> +#define EXTCON_CHG_USB_CDP	9	/* Charging Downstream Port */
> +
> +/* Jack external connector */
> +#define EXTCON_JACK_MICROPHONE	20
> +#define EXTCON_JACK_HEADPHONE	21
> +#define EXTCON_JACK_LINE_IN	22
> +#define EXTCON_JACK_LINE_OUT	23
> +#define EXTCON_JACK_VIDEO_IN	24
> +#define EXTCON_JACK_VIDEO_OUT	25
> +#define EXTCON_JACK_SPDIF_IN	26	/* Sony Philips Digital InterFace */
> +#define EXTCON_JACK_SPDIF_OUT	27
> +
> +/* Display external connector */
> +#define EXTCON_DISP_HDMI	40	/* High-Definition Multimedia Interface */
> +#define EXTCON_DISP_MHL		41	/* Mobile High-Definition Link */
> +#define EXTCON_DISP_DVI		42	/* Digital Visual Inteface */
> +#define EXTCON_DISP_VGA		43	/* Video Graphics Array */
> +
> +/* Miscellaneous external connector */
> +#define EXTCON_DOCK	60
> +#define EXTCON_JIG		61
> +#define EXTCON_MECHANICAL	62
> +
> +#define EXTCON_NUM		63
>  
>  struct extcon_cable;
>  
> 

cheers,
-roger

  parent reply	other threads:[~2015-10-05  8:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-04  3:45 [PATCH] extcon: Modify the id and name of external connector Chanwoo Choi
2015-10-04 12:51 ` Charles Keepax
2015-10-05  8:26 ` Roger Quadros [this message]
2015-10-05  9:01   ` Chanwoo Choi
2015-10-05  9:04     ` Chanwoo Choi
2015-10-05 10:49       ` Roger Quadros
2015-10-06  3:11         ` Chanwoo Choi

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=56123427.2030702@ti.com \
    --to=rogerq@ti.com \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=cw00.choi@samsung.com \
    --cc=cwchoi00@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=ramakrishna.pallala@intel.com \
    --cc=rf@opensource.wolfsonmicro.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.