From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Jun Subject: Re: [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation Date: Mon, 17 Aug 2015 16:20:24 +0800 Message-ID: <20150817082023.GB7122@shlinux2> References: <20150814085527.GA17920@shlinux2> <20150817011541.GA7122@shlinux2> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Baolin Wang Cc: Felipe Balbi , Mark Brown , Linus Walleij , LKML , Greg KH , Peter Chen , sojka-Knnw/vAvyUalVyrhU4qvOw@public.gmane.org, Alan Stern , r.baldyga-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, device-mainlining-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I@public.gmane.org, sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Dmitry Eremin-Solenikov , David Woodhouse , sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, Lee Jones , patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org, linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-pm@vger.kernel.org On Mon, Aug 17, 2015 at 02:02:08PM +0800, Baolin Wang wrote: > On 17 August 2015 at 09:15, Li Jun wrote: > > On Fri, Aug 14, 2015 at 07:04:56PM +0800, Baolin Wang wrote: > >> On 14 August 2015 at 16:55, Li Jun wrote: > >> > Hi Baolin, > >> > > >> > On Fri, Aug 14, 2015 at 05:47:43PM +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. > >> >> > >> >> Providing a standard framework for doing this in the kernel. > >> >> > >> > > >> > Why not add power supply class support into this? > >> > > >> > >> Hi Jun, > >> > >> We don't need the power supply class support into the usb charger, > > I suppose usb charger is also a power supply for the system, we can use power > > supply class framework for notify mechanism and get/set many attributes(maybe > > also the current limit), I see those usb charger drivers under ./driver/power/ > > are designed with power supply supported. > > > > I don't think so. The usb charger is rely on the usb gadget, which is > not a complete power supply device and it combines the usb and the > power supply. Thus we make it into usb gadget system. Thanks. > Why it cannot be a complete power supply device? I was thinking this framework can cover it, I have no doubt on putting this framework into gadget system, but still can't understand why we don't need power supply class at all for a usb charger, or you think introduce power supply into usb gadget is not a right direction from code structure point view? Li Jun > > Li Jun > >> just introduce the notify mechanism for power to set the current limit > >> when notifying some events from usb charger. Maybe I misunderstand > >> your meanings, please describe it detailedly. Thanks for your > >> comments. > >> > >> > Li Jun > >> > > >> > >> > >> > >> -- > >> Baolin.wang > >> Best Regards > > > > -- > Baolin.wang > Best Regards -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html