lkml.org 
[lkml]   [2011]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: Adding USB charge current property in the Linux Battery core
Date
> -----Original Message-----
> From: Felipe Balbi [mailto:balbi@ti.com]
> Sent: Wednesday, November 09, 2011 5:50 PM
> To: Ashish Jangam
> Cc: balbi@ti.com; linaro-dev@lists.linaro.org; linux-
> kernel@vger.kernel.org; arnd@arndb.de; eric.miao@linaro.org; Mark Brown;
> david-b@pacbell.net
> Subject: Re: Adding USB charge current property in the Linux Battery core
>
> On Wed, Nov 09, 2011 at 12:13:14PM +0000, Ashish Jangam wrote:
> >
> > > -----Original Message-----
> > > From: Felipe Balbi [mailto:balbi@ti.com]
> > > Sent: Wednesday, November 09, 2011 1:50 PM
> > > To: Ashish Jangam
> > > Cc: linaro-dev@lists.linaro.org; linux-kernel@vger.kernel.org;
> > > arnd@arndb.de; eric.miao@linaro.org; Mark Brown
> > > Subject: Re: Adding USB charge current property in the Linux Battery
> core
> > >
> > > Hi,
> > >
> > > On Wed, Nov 09, 2011 at 01:43:37PM +0530, ashishj3 wrote:
> > > > For a better performance in USB charging operation, the DA9052/53
> > > charging
> > > > current can be configured in accordance with the USB host current
> > > > delivering capacity (known through USB drivers negotiation).
> > > >
> > > > To implement this useful feature, a new writable property "USB charge
> > > current"
> > > > needs to be added in the Linux battery core.
> > > >
> > > > Let me know your views on it.
> > >
> > > that's the wrong way to do it. What we need is to use the transceiver
> > > notifications to notify every time someone calls usb_gadget_vbus_draw()
> > > and pass the mA parameter as argument to the event notification.
> > >
> >
> > This means that we need to modify the function usb_gadget_vbus_draw()
> > to add a call like blocking_notifier_call_chain() but will this be fine
> with
> > the usb gadget driver maintainers?
>
> I am the USB gadget driver maintainer and I have plans to do that
> myself. First thing we need to do is convert the final UDC drivers to
> the udc Class which I wrote and Sebastian helped brushing it up, then we
> uninline the usb_gadget_* wrappers and move them to
> drivers/usb/gadget/udc-core.c, then we can move the transceiver notifier
> to the UDC as it makes more sense, and convert blocking into atomic
> notifier.

This sounds good but since most PMICs have I2C bus connectivity using atomic
notifier can introduce problems.
>
> After that we can add notifications to all gadget events/API/etc...
>
> --
> balbi


\
 
 \ /
  Last update: 2011-11-09 13:33    [W:2.375 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site