All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] extcon: Add documentation for EXTCON_CHG_USB_SLOW/FAST
@ 2017-01-03  5:50 ` Baolin Wang
  2017-01-03 12:48   ` Chanwoo Choi
  2017-01-06  8:55   ` Chanwoo Choi
  0 siblings, 2 replies; 5+ messages in thread
From: Baolin Wang @ 2017-01-03  5:50 UTC (permalink / raw)
  To: myungjoo.ham, cw00.choi
  Cc: linux-kernel, linaro-kernel, baolin.wang, broonie, neilb

Currently there are no documentation for EXTCON_CHG_USB_SLOW/FAST
charger connector. These names don't mean much and no guide to tell
users how to use it, thus try to add documentation to make them clear.

Suggested-by: NeilBrown <neilb@suse.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
---
 include/linux/extcon.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index 0020123..ceec1f0 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -53,6 +53,10 @@
  * the USB connector, which means EXTCON_CHG_USB_SDP should always
  * appear together with EXTCON_USB. The same as ACA charger connector,
  * EXTCON_CHG_USB_ACA would normally appear with EXTCON_USB_HOST.
+ *
+ * A cable of type EXTCON_CHG_USB_SLOW can provide at least 500mA of
+ * current at 5V. A cable of type EXTCON_CHG_USB_FAST can provide at
+ * least 1A of current at 5V.
  */
 #define EXTCON_CHG_USB_SDP	5	/* Standard Downstream Port */
 #define EXTCON_CHG_USB_DCP	6	/* Dedicated Charging Port */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] extcon: Add documentation for EXTCON_CHG_USB_SLOW/FAST
  2017-01-03  5:50 ` [PATCH] extcon: Add documentation for EXTCON_CHG_USB_SLOW/FAST Baolin Wang
@ 2017-01-03 12:48   ` Chanwoo Choi
  2017-01-03 23:01     ` NeilBrown
  2017-01-06  8:55   ` Chanwoo Choi
  1 sibling, 1 reply; 5+ messages in thread
From: Chanwoo Choi @ 2017-01-03 12:48 UTC (permalink / raw)
  To: Baolin Wang
  Cc: myungjoo.ham, Chanwoo Choi, Mark Brown, linaro-kernel,
	linux-kernel, neilb

Hi Baolin,

2017-01-03 14:50 GMT+09:00 Baolin Wang <baolin.wang@linaro.org>:
> Currently there are no documentation for EXTCON_CHG_USB_SLOW/FAST
> charger connector. These names don't mean much and no guide to tell
> users how to use it, thus try to add documentation to make them clear.
>
> Suggested-by: NeilBrown <neilb@suse.com>
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
> ---
>  include/linux/extcon.h |    4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/extcon.h b/include/linux/extcon.h
> index 0020123..ceec1f0 100644
> --- a/include/linux/extcon.h
> +++ b/include/linux/extcon.h
> @@ -53,6 +53,10 @@
>   * the USB connector, which means EXTCON_CHG_USB_SDP should always
>   * appear together with EXTCON_USB. The same as ACA charger connector,
>   * EXTCON_CHG_USB_ACA would normally appear with EXTCON_USB_HOST.
> + *
> + * A cable of type EXTCON_CHG_USB_SLOW can provide at least 500mA of
> + * current at 5V. A cable of type EXTCON_CHG_USB_FAST can provide at
> + * least 1A of current at 5V.

I agree the at least current value(mA) for EXTCON_CHG_USB_SLOW/FAST.
But, I'm worried that  fix the 5V.

I have a plan to support the 'current' and 'voltage' property for
charger connector as following:
- EXTCON_PROP_CHG_CURRNET
- EXTCON_PROP_CHG_VOLTAGE

So, I don't like to fix the voltage for EXTCON_CHG_USB_SLOW/FAST.
How about this?


>   */
>  #define EXTCON_CHG_USB_SDP     5       /* Standard Downstream Port */
>  #define EXTCON_CHG_USB_DCP     6       /* Dedicated Charging Port */
> --
> 1.7.9.5
>
> _______________________________________________
> linaro-kernel mailing list
> linaro-kernel@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/linaro-kernel



-- 
Best Regards,
Chanwoo Choi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] extcon: Add documentation for EXTCON_CHG_USB_SLOW/FAST
  2017-01-03 12:48   ` Chanwoo Choi
@ 2017-01-03 23:01     ` NeilBrown
  2017-01-06  8:50       ` Chanwoo Choi
  0 siblings, 1 reply; 5+ messages in thread
From: NeilBrown @ 2017-01-03 23:01 UTC (permalink / raw)
  To: cwchoi00, Baolin Wang
  Cc: myungjoo.ham, Chanwoo Choi, Mark Brown, linaro-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2437 bytes --]

On Tue, Jan 03 2017, Chanwoo Choi wrote:

> Hi Baolin,
>
> 2017-01-03 14:50 GMT+09:00 Baolin Wang <baolin.wang@linaro.org>:
>> Currently there are no documentation for EXTCON_CHG_USB_SLOW/FAST
>> charger connector. These names don't mean much and no guide to tell
>> users how to use it, thus try to add documentation to make them clear.
>>
>> Suggested-by: NeilBrown <neilb@suse.com>
>> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
>> ---
>>  include/linux/extcon.h |    4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/include/linux/extcon.h b/include/linux/extcon.h
>> index 0020123..ceec1f0 100644
>> --- a/include/linux/extcon.h
>> +++ b/include/linux/extcon.h
>> @@ -53,6 +53,10 @@
>>   * the USB connector, which means EXTCON_CHG_USB_SDP should always
>>   * appear together with EXTCON_USB. The same as ACA charger connector,
>>   * EXTCON_CHG_USB_ACA would normally appear with EXTCON_USB_HOST.
>> + *
>> + * A cable of type EXTCON_CHG_USB_SLOW can provide at least 500mA of
>> + * current at 5V. A cable of type EXTCON_CHG_USB_FAST can provide at
>> + * least 1A of current at 5V.
>
> I agree the at least current value(mA) for EXTCON_CHG_USB_SLOW/FAST.
> But, I'm worried that  fix the 5V.
>
> I have a plan to support the 'current' and 'voltage' property for
> charger connector as following:
> - EXTCON_PROP_CHG_CURRNET
> - EXTCON_PROP_CHG_VOLTAGE
>
> So, I don't like to fix the voltage for EXTCON_CHG_USB_SLOW/FAST.
> How about this?

I think you should be very caution about pursuing this approach.  As it
stands, it implies that a given cable has a fixed voltage and a fixed
available current.  This is not true of many cables.

The USB battery charging spec defines a range of possibly current limits
that each cable type can provide.  There is a defined protocol for the
slave to detect how much current is available within that range.  So
setting a single "CHG_CURRENT" property would be incorrect.

For SDP ports, the current limit is negotiation using the USB protocol
and it is completely unknown to the cable (and so to EXTCON).  For
USB-C, there is a greater range of voltages and currents.  I don't know
the details, but I do know that a single-valued "PROP_CHG_VOLTAGE" would
not be appropriate.

I think that EXTCON should stick with identifying the type of cable, and
leave it to the client to determine what other properties are implied by
each particular cable type.

Thanks,
NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] extcon: Add documentation for EXTCON_CHG_USB_SLOW/FAST
  2017-01-03 23:01     ` NeilBrown
@ 2017-01-06  8:50       ` Chanwoo Choi
  0 siblings, 0 replies; 5+ messages in thread
From: Chanwoo Choi @ 2017-01-06  8:50 UTC (permalink / raw)
  To: NeilBrown, cwchoi00, Baolin Wang
  Cc: myungjoo.ham, Mark Brown, linaro-kernel, linux-kernel

Hi NeilBrown,

On 2017년 01월 04일 08:01, NeilBrown wrote:
> On Tue, Jan 03 2017, Chanwoo Choi wrote:
> 
>> Hi Baolin,
>>
>> 2017-01-03 14:50 GMT+09:00 Baolin Wang <baolin.wang@linaro.org>:
>>> Currently there are no documentation for EXTCON_CHG_USB_SLOW/FAST
>>> charger connector. These names don't mean much and no guide to tell
>>> users how to use it, thus try to add documentation to make them clear.
>>>
>>> Suggested-by: NeilBrown <neilb@suse.com>
>>> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
>>> ---
>>>  include/linux/extcon.h |    4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/include/linux/extcon.h b/include/linux/extcon.h
>>> index 0020123..ceec1f0 100644
>>> --- a/include/linux/extcon.h
>>> +++ b/include/linux/extcon.h
>>> @@ -53,6 +53,10 @@
>>>   * the USB connector, which means EXTCON_CHG_USB_SDP should always
>>>   * appear together with EXTCON_USB. The same as ACA charger connector,
>>>   * EXTCON_CHG_USB_ACA would normally appear with EXTCON_USB_HOST.
>>> + *
>>> + * A cable of type EXTCON_CHG_USB_SLOW can provide at least 500mA of
>>> + * current at 5V. A cable of type EXTCON_CHG_USB_FAST can provide at
>>> + * least 1A of current at 5V.
>>
>> I agree the at least current value(mA) for EXTCON_CHG_USB_SLOW/FAST.
>> But, I'm worried that  fix the 5V.
>>
>> I have a plan to support the 'current' and 'voltage' property for
>> charger connector as following:
>> - EXTCON_PROP_CHG_CURRNET
>> - EXTCON_PROP_CHG_VOLTAGE
>>
>> So, I don't like to fix the voltage for EXTCON_CHG_USB_SLOW/FAST.
>> How about this?
> 
> I think you should be very caution about pursuing this approach.  As it
> stands, it implies that a given cable has a fixed voltage and a fixed
> available current.  This is not true of many cables.
> 
> The USB battery charging spec defines a range of possibly current limits
> that each cable type can provide.  There is a defined protocol for the
> slave to detect how much current is available within that range.  So
> setting a single "CHG_CURRENT" property would be incorrect.
> 
> For SDP ports, the current limit is negotiation using the USB protocol
> and it is completely unknown to the cable (and so to EXTCON).  For
> USB-C, there is a greater range of voltages and currents.  I don't know
> the details, but I do know that a single-valued "PROP_CHG_VOLTAGE" would
> not be appropriate.
> 
> I think that EXTCON should stick with identifying the type of cable, and
> leave it to the client to determine what other properties are implied by
> each particular cable type.

First of all, Thanks for your detailed comment. The power-supply already
has the voltage/current property for power-supply device as following:
- POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT
- POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX
- POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE
- POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX

-- 
Best Regards,
Chanwoo Choi
S/W Center, Samsung Electronics

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] extcon: Add documentation for EXTCON_CHG_USB_SLOW/FAST
  2017-01-03  5:50 ` [PATCH] extcon: Add documentation for EXTCON_CHG_USB_SLOW/FAST Baolin Wang
  2017-01-03 12:48   ` Chanwoo Choi
@ 2017-01-06  8:55   ` Chanwoo Choi
  1 sibling, 0 replies; 5+ messages in thread
From: Chanwoo Choi @ 2017-01-06  8:55 UTC (permalink / raw)
  To: Baolin Wang, myungjoo.ham; +Cc: linux-kernel, linaro-kernel, broonie, neilb

On 2017년 01월 03일 14:50, Baolin Wang wrote:
> Currently there are no documentation for EXTCON_CHG_USB_SLOW/FAST
> charger connector. These names don't mean much and no guide to tell
> users how to use it, thus try to add documentation to make them clear.
> 
> Suggested-by: NeilBrown <neilb@suse.com>
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
> ---
>  include/linux/extcon.h |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/extcon.h b/include/linux/extcon.h
> index 0020123..ceec1f0 100644
> --- a/include/linux/extcon.h
> +++ b/include/linux/extcon.h
> @@ -53,6 +53,10 @@
>   * the USB connector, which means EXTCON_CHG_USB_SDP should always
>   * appear together with EXTCON_USB. The same as ACA charger connector,
>   * EXTCON_CHG_USB_ACA would normally appear with EXTCON_USB_HOST.
> + *
> + * A cable of type EXTCON_CHG_USB_SLOW can provide at least 500mA of
> + * current at 5V. A cable of type EXTCON_CHG_USB_FAST can provide at
> + * least 1A of current at 5V.

When I applied this patch, I use the 'connector expression' instead of 'cable'.

>   */
>  #define EXTCON_CHG_USB_SDP	5	/* Standard Downstream Port */
>  #define EXTCON_CHG_USB_DCP	6	/* Dedicated Charging Port */
> 

Applied it. Thanks.

-- 
Best Regards,
Chanwoo Choi
S/W Center, Samsung Electronics

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-06  8:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170103055156epcas2p4dc48ae31a3d0911ec7aee1a2872e46af@epcas2p4.samsung.com>
2017-01-03  5:50 ` [PATCH] extcon: Add documentation for EXTCON_CHG_USB_SLOW/FAST Baolin Wang
2017-01-03 12:48   ` Chanwoo Choi
2017-01-03 23:01     ` NeilBrown
2017-01-06  8:50       ` Chanwoo Choi
2017-01-06  8:55   ` Chanwoo Choi

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.