From: Felipe Balbi <balbi@kernel.org>
To: Baolin Wang <baolin.wang@linaro.org>,
gregkh@linuxfoundation.org, sre@kernel.org, dbaryshkov@gmail.com,
dwmw2@infradead.org
Cc: robh@kernel.org, jun.li@nxp.com, m.szyprowski@samsung.com,
ruslan.bilovol@gmail.com, peter.chen@freescale.com,
stern@rowland.harvard.edu, r.baldyga@samsung.com,
grygorii.strashko@ti.com, yoshihiro.shimoda.uh@renesas.com,
lee.jones@linaro.org, broonie@kernel.org,
ckeepax@opensource.wolfsonmicro.com,
patches@opensource.wolfsonmicro.com, baolin.wang@linaro.org,
linux-pm@vger.kernel.org, linux-usb@vger.kernel.org,
device-mainlining@lists.linuxfoundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v12 2/4] gadget: Support for the usb charger framework
Date: Tue, 21 Jun 2016 13:27:50 +0300 [thread overview]
Message-ID: <87bn2uomzd.fsf@linux.intel.com> (raw)
In-Reply-To: <f7bae2566824a5e1da14c1a19dee6af5f250262f.1466497506.git.baolin.wang@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 962 bytes --]
Hi,
Baolin Wang <baolin.wang@linaro.org> writes:
> For supporting the usb charger, it adds the usb_charger_init() and
> usb_charger_exit() functions for usb charger initialization and exit.
>
> It will report to the usb charger when the gadget state is changed,
> then the usb charger can do the power things.
>
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
> Reviewed-by: Li Jun <jun.li@nxp.com>
> Tested-by: Li Jun <jun.li@nxp.com>
Before anything, I must say that I really liked this patch. It's
minimaly invasive to udc core and does all the necessary changes. If it
wasn't for the extra charger class, this would've been perfect.
Can't you just tie a charger to a UDC and avoid the charger class
completely?
> static inline int usb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA)
> {
> + if (gadget->charger)
I guess you could do this check inside
usb_gadget_set_cur_limit_by_type() itself.
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2016-06-21 10:34 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 8:39 [PATCH v12 0/4] Introduce usb charger framework to deal with the usb gadget power negotation Baolin Wang
2016-06-21 8:39 ` [PATCH v12 1/4] gadget: Introduce the usb charger framework Baolin Wang
2016-06-21 10:25 ` Felipe Balbi
2016-06-21 11:23 ` Baolin Wang
2016-06-21 14:50 ` Felipe Balbi
2016-06-22 1:49 ` Baolin Wang
2016-06-21 8:39 ` [PATCH v12 2/4] gadget: Support for " Baolin Wang
2016-06-21 10:27 ` Felipe Balbi [this message]
2016-06-21 11:29 ` Baolin Wang
2016-06-21 11:49 ` Felipe Balbi
2016-06-21 12:05 ` Baolin Wang
2016-06-21 12:27 ` Felipe Balbi
2016-06-21 12:34 ` Baolin Wang
2016-06-21 12:36 ` Felipe Balbi
2016-06-21 12:43 ` Baolin Wang
2016-06-21 12:53 ` Felipe Balbi
2016-06-21 12:54 ` Felipe Balbi
2016-06-22 1:45 ` Baolin Wang
2016-06-23 8:56 ` Baolin Wang
2016-06-29 8:20 ` Felipe Balbi
2016-06-29 8:31 ` Baolin Wang
2016-06-29 8:34 ` Felipe Balbi
2016-06-29 8:38 ` Baolin Wang
2016-06-29 12:06 ` Felipe Balbi
2016-06-29 12:16 ` Baolin Wang
2016-06-29 12:30 ` Felipe Balbi
2016-06-21 8:39 ` [PATCH v12 3/4] gadget: Integrate with the usb gadget supporting for usb charger Baolin Wang
2016-06-21 8:39 ` [PATCH v12 4/4] power: wm831x_power: Support USB charger current limit management Baolin Wang
2016-06-21 10:30 ` Felipe Balbi
2016-06-21 11:03 ` Mark Brown
2016-06-21 11:45 ` Baolin Wang
2016-06-21 11:53 ` Felipe Balbi
2016-06-21 11:57 ` Baolin Wang
2016-06-21 11:50 ` Felipe Balbi
2016-06-21 14:53 ` 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=87bn2uomzd.fsf@linux.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=grygorii.strashko@ti.com \
--cc=jun.li@nxp.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=m.szyprowski@samsung.com \
--cc=patches@opensource.wolfsonmicro.com \
--cc=peter.chen@freescale.com \
--cc=r.baldyga@samsung.com \
--cc=robh@kernel.org \
--cc=ruslan.bilovol@gmail.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