All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Chen <hzpeterchen@gmail.com>
To: Baolin Wang <baolin.wang@linaro.org>
Cc: balbi@kernel.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 0/4] Introduce usb charger framework to deal with the usb gadget power negotation
Date: Tue, 5 Apr 2016 14:46:37 +0800	[thread overview]
Message-ID: <20160405064637.GA31351@shlinux2.ap.freescale.net> (raw)
In-Reply-To: <cover.1459494743.git.baolin.wang@linaro.org>

On Fri, Apr 01, 2016 at 03:21:48PM +0800, Baolin Wang wrote:
> Currently the Linux kernel does not provide any standard integration of this
> feature that integrates the USB subsystem with the system power regulation
> provided by PMICs meaning that either vendors must add this in their kernels
> or USB gadget devices based on Linux (such as mobile phones) may not behave
> as they should. Thus provide a standard framework for doing this in kernel.
> 
> Now introduce one user with wm831x_power to support and test the usb charger,
> which is pending testing. Moreover there may be other potential users will use
> it in future.
> 
> Changes since v8:
>  - Remove the bus type things.
>  - Introduce one charger_detect() callback to detect charger type if it is needed.
>  - Add some sysfs attributes for showing the charger type and state.
>  - Change the charger current attributes to read only.
>  - Move charger state and type definition to include/uapi.
>  - Some other optimiazations.
> 
> Baolin Wang (4):
>   gadget: Introduce the usb charger framework
>   gadget: Support for the usb charger framework
>   gadget: Integrate with the usb gadget supporting for usb charger
>   power: wm831x_power: Support USB charger current limit management
> 

We are thinking USB charger framework for Freescale i.mx SoC series,
since our internal framework is not good enough.
So I have more questions for your framework since there are many
different USB charger designs, and I hope it is universal.

- I would like to see your all code to let the charger work, eg
you have said the charger detection is done by PMIC automatically,
but I did not find your PMIC code to read charger type.

Besides, how you can make sure the charger detection has finished
before the framework handles USB_CHARGER_PRESENT event?

- I commented the current limit at different situations for USB
charger last time, but I have not seen your further comments.
I would like give it again. For DCP, you can notify charger IC
once you get the charger type. But for CDP/SDP, you need to
notify charger IC after set configuration has finished, since
the host may still not be ready to give high current.

-- 

Best Regards,
Peter Chen

  parent reply	other threads:[~2016-04-05  6:53 UTC|newest]

Thread overview: 51+ 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 2/4] gadget: Support for the usb charger framework Baolin Wang
2016-04-06  7:19   ` Peter Chen
2016-04-06 10:46     ` Baolin Wang
2016-04-06 12:03       ` Jun Li
     [not found]         ` <AM4PR04MB2130F58AA1018FFD367C89E0899F0-WOempg8NbQQzjTQnahXoOs9NdZoXdze2vxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-04-06 12:21           ` Felipe Balbi
2016-04-06 12:21             ` Felipe Balbi
2016-04-06 12:51             ` Jun Li
     [not found]               ` <AM4PR04MB213054CF3F597CE2E6FE976F899F0-WOempg8NbQQzjTQnahXoOs9NdZoXdze2vxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-04-06 12:55                 ` Felipe Balbi
2016-04-06 12:55                   ` Felipe Balbi
     [not found]                   ` <87oa9m28x0.fsf-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-04-06 13:49                     ` Jun Li
2016-04-06 13:49                       ` Jun Li
2016-04-06 13:58                       ` Felipe Balbi
2016-04-06 13:58                         ` Felipe Balbi
2016-04-07  3:03                         ` Peter Chen
2016-04-07  4:58                           ` Felipe Balbi
2016-04-07  4:58                             ` Felipe Balbi
     [not found] ` <cover.1459494743.git.baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-04-01  7:21   ` [PATCH v9 1/4] gadget: Introduce " Baolin Wang
2016-04-01  7:21     ` Baolin Wang
2016-04-05  7:56     ` Peter Chen
     [not found]       ` <20160405075612.GB31351-Fb7DQEYuewWctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2016-04-05  9:41         ` Baolin Wang
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
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:31         ` Baolin Wang
2016-04-06 11:55         ` Jun Li
2016-04-06 11:55           ` Jun Li
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     ` 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 ` Peter Chen [this message]
2016-04-05  7:54   ` [PATCH v9 0/4] Introduce usb charger framework to deal with the usb gadget power negotation 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=20160405064637.GA31351@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.