lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <56123C6C.2020108@samsung.com>
Date:	Mon, 05 Oct 2015 18:01:32 +0900
From:	Chanwoo Choi <cw00.choi@...sung.com>
To:	Roger Quadros <rogerq@...com>, Chanwoo Choi <cwchoi00@...il.com>,
	linux-kernel@...r.kernel.org
Cc:	k.kozlowski@...sung.com, ramakrishna.pallala@...el.com,
	gregkh@...uxfoundation.org, ckeepax@...nsource.wolfsonmicro.com,
	rf@...nsource.wolfsonmicro.com,
	patches@...nsource.wolfsonmicro.com, myungjoo.ham@...sung.com
Subject: Re: [PATCH] extcon: Modify the id and name of external connector

Hi Roger,

On 2015년 10월 05일 17:26, Roger Quadros wrote:
> 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@...sung.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?

There is no specification about FAST & SLOW USB charger.
Just, the datasheet of MUIC (Micro-USB Interface Circuit) device
can detect the DCP (Dedicated Charging Port) and more two type charger
according to current value as following:

For example,
max77693 MUIC device (is used on Samsung Galaxy S3)
- CHG_USB_DCP: current up to 1.5A
- CHG_USB_SLOW : current up to 500mA
- CHG_USB_FAST : current up to 1A or 2A

max77836 MUIC device (is used on Samsung gear 2)
- CHG_USB_DCP: current up to 1.5A
- CHG_USB_SLOW : current up to 500mA
- CHG_USB_FAST : current up to 1A or 2A

max77843 MUIC device (is used on Samsung Galaxy Note4)
- CHG_USB_DCP: current up to 1.5A
- CHG_USB_SLOW : current up to 500mA
- CHG_USB_FAST : current up to 1A or 2A

If MUIC device detects the some USB charger which
has the more maximum current than DCP, this muic device
call the FAST charger. Also, there is oppsite case for SLOW charger.

> 
>> +	[EXTCON_CHG_USB_DCP]	= "EXTCON_CHG_USB_DCP",
>> +	[EXTCON_CHG_USB_CDP]	= "EXTCON_CHG_USB_CDP",
> 
> What about USB ACA?

ACA is "Accessory Charging Adapter". But, I didn't understand the role
of ACA charger type. I'll drop ACA type on next version.

[snip]

Thanks,
Chanwoo Choi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ