From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935464AbdACXBf (ORCPT ); Tue, 3 Jan 2017 18:01:35 -0500 Received: from mx2.suse.de ([195.135.220.15]:59488 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934590AbdACXBb (ORCPT ); Tue, 3 Jan 2017 18:01:31 -0500 From: NeilBrown To: cwchoi00@gmail.com, Baolin Wang Date: Wed, 04 Jan 2017 10:01:18 +1100 Cc: "myungjoo.ham\@samsung.com" , Chanwoo Choi , Mark Brown , linaro-kernel@lists.linaro.org, linux-kernel Subject: Re: [PATCH] extcon: Add documentation for EXTCON_CHG_USB_SLOW/FAST In-Reply-To: References: User-Agent: Notmuch/0.22.1 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-suse-linux-gnu) Message-ID: <87y3yrn3y9.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain On Tue, Jan 03 2017, Chanwoo Choi wrote: > Hi Baolin, > > 2017-01-03 14:50 GMT+09:00 Baolin Wang : >> 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 >> Signed-off-by: Baolin Wang >> --- >> 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAlhsLT4ACgkQOeye3VZi gblErw//V9yays/Arl0ClIJicQ0yntfu4zq39htYXJjv/QGS/66oiHFoK0XTCiZG vr2Y8yCEST45+FlNpsGVb7hZ0ska8BNi7dzEG0jMDaQDA+9sRMdMbZA1tERLQLzl DOAyQxNr4/ROjOGKNyHdLCNY9AeYgirfANOKLRWSna3CG2+hEsZS7xNVrx09Utxe rPTKmt6Nhzv80z4Mht7C2nwNS9UwzfF79FR8b9PnDaRDRb+/xiZAF9OvT2IR2V7o +b9qgSrj8G+OLnIU+SEO1Tu6PxDnI9Tmj51AuPlNRTcsmVZ4PLXHLnnPOcSRW28G FI+Ew8H68qyJQvEeZ3K4lgT95S9Kh3qjCdczIeD6U4lKIlpnA4o7a+XuGEyrhi+D qBw1sGJR2U444VsCbo+CP42ldZiMYVfUkYHR8kxfaWJ67bO8RXxoGBqZMms0qtB3 +UgeBQuYVAd5qsJfWHLhjbOzzFhHGNNXMO536Tisxs5O1NB/NFlhBmQIvNowb3xd 1Y+roY8p7uBL+TT3PRd/5QMc/CIDdAxAMipj7ZIJV9Yi6nokHeGhPjOA0+HgpFTC q0UQCtQuoRJ6QwQuFzhjRRKfAmPHQF1X5sZJrzIxEyvBUx/ALypV4zGxTHVwXK/1 JXiShrIlznyl2Udmny3JYXEmxWAF9XdXxXgdmbOD1fskG6bC+LM= =XQxS -----END PGP SIGNATURE----- --=-=-=--