[Gta04-owner] [PATCH 08/15] twl4030_charger: distinguish between USB current and 'AC' current
NeilBrown
neilb at suse.de
Wed Mar 4 07:53:02 CET 2015
On Mon, 2 Mar 2015 22:05:10 +0100 Pavel Machek <pavel at ucw.cz> wrote:
> Hi!
>
> > The twl4030 charger has two current sources, 'USB' and 'AC' (which is
> > really DC of course...).
> >
> > If 'AC' is providing current, we should set the current limit
> > differently to when it isn't (and so USB is used).
> > So split 'cur' into 'usb_cur' and 'ac_cur' and use accordingly.
> >
> > Now we must review the current setting on any interrupt or USB
> > event which might indicate that the charger-source has changed.
> >
> > Signed-off-by: NeilBrown <neilb at suse.de>
>
> > @@ -103,7 +104,9 @@ struct twl4030_bci {
> > /* ichg values in uA. If any are 'large', we set CGAIN to
>
> ichg/_cur values
>
> > * '1' which doubles the range for half the precision.
> > */
> > - int ichg_eoc, ichg_lo, ichg_hi, cur;
> > + int ichg_eoc, ichg_lo, ichg_hi;
> > + int usb_cur, ac_cur;
>
> > + /* If VAC exceeds 4.5V (MADC 11) and ac is enabled, set current
> > + * for 'ac'
>
> /*
> * If AC voltage exceeds 4.5V (MADC 11) and AC is enabled, set current
> * for 'ac'.
>
>
> Acked-by: Pavel Machek <pavel at ucw.cz>
>
Thanks - I made those changes, or something much like them.
NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20150304/5d12e08f/attachment.asc>
More information about the Gta04-owner
mailing list