From: Felipe Balbi <balbi@kernel.org>
To: Peter Chen <hzpeterchen@gmail.com>
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: Thu, 07 Apr 2016 07:56:50 +0300 [thread overview]
Message-ID: <87bn5m10fh.fsf@intel.com> (raw)
In-Reply-To: <20160407023925.GA10672@shlinux2.ap.freescale.net>
[-- Attachment #1: Type: text/plain, Size: 3317 bytes --]
Hi,
Peter Chen <hzpeterchen@gmail.com> writes:
> On Wed, Apr 06, 2016 at 01:25:06PM +0300, Felipe Balbi wrote:
>>
>> 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 ?
>>
>
> +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
> +};
>
> Ok, even the users are interesting in current limit, we still have no
> necessary to know all kinds of chargers limit and current value, since
> we already have charger type user interface, the framework can show
> limit according to charger type.
Oh, now I get your comment and I totally agree. We already *know* the
detected charger type, there's no point in showing them all.
> I think below user interfaces are enough, who do you think?
>
> +static struct attribute *usb_charger_attrs[] = {
> + &dev_attr_current.attr,
> + &dev_attr_current_limit.attr,
> + &dev_attr_charger_type.attr,
> + &dev_attr_charger_state.attr,
> + NULL
> +};
agreed, const though.
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2016-04-07 4:58 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
2016-04-06 10:25 ` Felipe Balbi
2016-04-07 2:39 ` Peter Chen
2016-04-07 4:56 ` Felipe Balbi [this message]
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=87bn5m10fh.fsf@intel.com \
--to=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=hzpeterchen@gmail.com \
--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).