linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Chen <hzpeterchen@gmail.com>
To: Felipe Balbi <balbi@kernel.org>
Cc: Baolin Wang <baolin.wang@linaro.org>,
	gregkh@linuxfoundation.org, sre@kernel.org, dbaryshkov@gmail.com,
	dwmw2@infradead.org, peter.chen@freescale.com,
	stern@rowland.harvard.edu, r.baldyga@samsung.com,
	yoshihiro.shimoda.uh@renesas.com, lee.jones@linaro.org,
	broonie@kernel.org, ckeepax@opensource.wolfsonmicro.com,
	patches@opensource.wolfsonmicro.com, linux-pm@vger.kernel.org,
	linux-usb@vger.kernel.org,
	device-mainlining@lists.linuxfoundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework
Date: Wed, 6 Apr 2016 16:10:06 +0800	[thread overview]
Message-ID: <20160406081006.GD21101@shlinux2.ap.freescale.net> (raw)
In-Reply-To: <87shyz2md5.fsf@intel.com>

On Wed, Apr 06, 2016 at 11:05:26AM +0300, Felipe Balbi wrote:
> Peter Chen <hzpeterchen@gmail.com> writes:
> > On Wed, Apr 06, 2016 at 10:38:23AM +0300, Felipe Balbi wrote:
> >> Peter Chen <hzpeterchen@gmail.com> writes:
> >> > On Fri, Apr 01, 2016 at 03:21:49PM +0800, Baolin Wang wrote:
> >> >  +
> >> >> +static struct attribute *usb_charger_attrs[] = {
> >> >> +	&dev_attr_sdp_current.attr,
> >> >> +	&dev_attr_dcp_current.attr,
> >> >> +	&dev_attr_cdp_current.attr,
> >> >> +	&dev_attr_aca_current.attr,
> >> >> +	&dev_attr_charger_type.attr,
> >> >> +	&dev_attr_charger_state.attr,
> >> >> +	NULL
> >> >> +};
> >> >
> >> > The user may only care about current limit, type and state, why they
> >> > need to care what type's current limit, it is the usb charger
> >> > framework handles, the framework judge the current according to
> >> > charger type and USB state (connect/configured/suspended).
> >> 
> >> it might be useful if we want to know that $this charger doesn't really
> >> give us as much current as it advertises.
> >> 
> >
> > As my understanding, the current limit is dynamic value, it should
> > report the value the charger supports now, eg, it connects SDP, but
> > the host is suspended now, then the value should be 2mA.
> 
> yes, and that's the limit. Now consider we connect to DCP or CDP and
> limit is 2000mA but we're charging at 1000mA ;-)
> 

Does the user need to know the $this charger limit? Don't they only
care about the current charging value? I have a USB cable which can
show charging current value, it changes from time to time, when it
connects to host pc, it shows 430mA; when it connects to dedicated
charger, it shows 1000mA.

-- 

Best Regards,
Peter Chen

  reply	other threads:[~2016-04-06  8:16 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01  7:21 [PATCH v9 0/4] Introduce usb charger framework to deal with the usb gadget power negotation Baolin Wang
2016-04-01  7:21 ` [PATCH v9 1/4] gadget: Introduce the usb charger framework Baolin Wang
2016-04-05  7:56   ` Peter Chen
2016-04-05  9:41     ` Baolin Wang
2016-04-06  7:25   ` Peter Chen
2016-04-06  7:38     ` Felipe Balbi
2016-04-06  7:43       ` Peter Chen
2016-04-06  8:05         ` Felipe Balbi
2016-04-06  8:10           ` Peter Chen [this message]
2016-04-06 10:25             ` Felipe Balbi
2016-04-07  2:39               ` Peter Chen
2016-04-07  4:56                 ` Felipe Balbi
2016-04-07  6:11                   ` Baolin Wang
2016-04-06  8:11           ` Peter Chen
2016-04-06 10:25             ` Felipe Balbi
2016-04-06  8:26   ` Jun Li
2016-04-06 11:31     ` Baolin Wang
2016-04-06 11:55       ` Jun Li
2016-04-01  7:21 ` [PATCH v9 2/4] gadget: Support for " Baolin Wang
2016-04-06  7:19   ` Peter Chen
2016-04-06 10:46     ` Baolin Wang
2016-04-06 12:03       ` Jun Li
2016-04-06 12:21         ` Felipe Balbi
2016-04-06 12:51           ` Jun Li
2016-04-06 12:55             ` Felipe Balbi
2016-04-06 13:49               ` Jun Li
2016-04-06 13:58                 ` Felipe Balbi
2016-04-07  3:03                   ` Peter Chen
2016-04-07  4:58                     ` Felipe Balbi
2016-04-01  7:21 ` [PATCH v9 3/4] gadget: Integrate with the usb gadget supporting for usb charger Baolin Wang
2016-04-01  7:21 ` [PATCH v9 4/4] power: wm831x_power: Support USB charger current limit management Baolin Wang
2016-04-05  6:46 ` [PATCH v9 0/4] Introduce usb charger framework to deal with the usb gadget power negotation Peter Chen
2016-04-05  7:54   ` Baolin Wang
2016-04-05  8:12     ` Peter Chen
2016-04-05  9:34       ` Baolin Wang
2016-04-05  9:43         ` Peter Chen
2016-04-05 11:06           ` Baolin Wang
2016-04-05 17:01           ` Mark Brown
2016-04-05 16:53       ` Mark Brown
2016-04-06  1:15         ` Peter Chen
2016-04-06 17:01           ` Mark Brown

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=20160406081006.GD21101@shlinux2.ap.freescale.net \
    --to=hzpeterchen@gmail.com \
    --cc=balbi@kernel.org \
    --cc=baolin.wang@linaro.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=dbaryshkov@gmail.com \
    --cc=device-mainlining@lists.linuxfoundation.org \
    --cc=dwmw2@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=peter.chen@freescale.com \
    --cc=r.baldyga@samsung.com \
    --cc=sre@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=yoshihiro.shimoda.uh@renesas.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).