RE: Adding USB charge current property in the Linux Battery core

From: Ashish Jangam
Date: Wed Nov 09 2011 - 07:13:44 EST



> -----Original Message-----
> From: Felipe Balbi [mailto:balbi@xxxxxx]
> Sent: Wednesday, November 09, 2011 1:50 PM
> To: Ashish Jangam
> Cc: linaro-dev@xxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> arnd@xxxxxxxx; eric.miao@xxxxxxxxxx; 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?

> Charger driver should 'subscribe' to transceiver notifications and
> use the mA argument to reconfigure charging.
>
> --
> balbi


¢éì®&Þ~º&¶¬–+-±éÝ¥Šw®žË±Êâmébžìdz¹Þ)í…æèw*jg¬±¨¶‰šŽŠÝj/êäz¹ÞŠà2ŠÞ¨è­Ú&¢)ß«a¶Úþø®G«éh®æj:+v‰¨Šwè†Ù>Wš±êÞiÛaxPjØm¶Ÿÿà -»+ƒùdš_