lkml.org 
[lkml]   [2016]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 1/4] gadget: Introduce the usb charger framework
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.

--

Best Regards,
Peter Chen

\
 
 \ /
  Last update: 2016-04-06 10:21    [W:0.069 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site