Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1372385

Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework

From Felipe Balbi <balbi@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework
Date 2016-04-06 12:30 +0200
Message-ID <rkSSL-2lx-31@gated-at.bofh.it> (permalink)
References (2 earlier) <rkQee-sD-9@gated-at.bofh.it> <rkQnU-wC-29@gated-at.bofh.it> <rkQxA-A1-11@gated-at.bofh.it> <rkQHg-Uv-5@gated-at.bofh.it> <rkQQW-XV-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi,

Peter Chen <hzpeterchen@gmail.com> writes:
> 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

Why not ? UI might want to change the color of the battery charging icon
if we're charging @ 2000mA or @ 1000mA to give some visual feedback as
to "how fast" battery is supposed to be charged.

> 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.

good for you, now what does that have to do with $subject ?

-- 
balbi

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework Peter Chen <hzpeterchen@gmail.com> - 2016-04-06 09:40 +0200
  Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework Felipe Balbi <balbi@kernel.org> - 2016-04-06 09:50 +0200
    Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework Peter Chen <hzpeterchen@gmail.com> - 2016-04-06 10:00 +0200
      Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework Felipe Balbi <balbi@kernel.org> - 2016-04-06 10:10 +0200
        Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework Peter Chen <hzpeterchen@gmail.com> - 2016-04-06 10:20 +0200
          Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework Felipe Balbi <balbi@kernel.org> - 2016-04-06 12:30 +0200
        Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework Peter Chen <hzpeterchen@gmail.com> - 2016-04-06 10:20 +0200
          Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework Felipe Balbi <balbi@kernel.org> - 2016-04-06 12:30 +0200
            Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework Peter Chen <hzpeterchen@gmail.com> - 2016-04-07 04:50 +0200
              Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework Felipe Balbi <balbi@kernel.org> - 2016-04-07 07:00 +0200
                Re: [PATCH v9 1/4] gadget: Introduce the usb charger framework Baolin Wang <baolin.wang@linaro.org> - 2016-04-07 08:20 +0200

csiph-web