[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160405064637.GA31351@shlinux2.ap.freescale.net>
Date: Tue, 5 Apr 2016 14:46:37 +0800
From: Peter Chen <hzpeterchen@...il.com>
To: Baolin Wang <baolin.wang@...aro.org>
Cc: balbi@...nel.org, gregkh@...uxfoundation.org, sre@...nel.org,
dbaryshkov@...il.com, dwmw2@...radead.org,
peter.chen@...escale.com, stern@...land.harvard.edu,
r.baldyga@...sung.com, yoshihiro.shimoda.uh@...esas.com,
lee.jones@...aro.org, broonie@...nel.org,
ckeepax@...nsource.wolfsonmicro.com,
patches@...nsource.wolfsonmicro.com, linux-pm@...r.kernel.org,
linux-usb@...r.kernel.org,
device-mainlining@...ts.linuxfoundation.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v9 0/4] Introduce usb charger framework to deal with the
usb gadget power negotation
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
Powered by blists - more mailing lists