[Gta04-owner] [PATCH 3.2] twl4030_charger: set usb max current through sysfs

Andreas Kemnade andreas at kemnade.info
Tue Mar 27 08:04:58 CEST 2012


Hi,

here are some first notes.


> > +	/* get setting of CGAIN bit */
> > +	status = twl4030_bci_read(TWL4030_BCICTL1, &bcictl1);
> > +	if (status < 0)
> > +		return status;
> > +	if (bcictl1 & TWL4030_CGAIN)
> > +		cur /= 2;
> > +	cur = cur / 1665;
> > +	if (cur > 511)
> > +		return -EINVAL;
> > +	if (cur < 0)
> > +		return -EINVAL;
> 
> I think this should be
>         if (cur < 256)
> 
> should it not?  The TRM said that the high bit is forced to '1'.
> 
The high bit is bit 9, 1<<9 = 512. But it is always set because the current
is translated into a voltage from 0.75V to 1.5V
0.75 V corresponds to 512 and 0mA. 1.5V corresponds to 1023 and 852mA (1704mA if CGAIN
is set to 1)

> Also, I wonder if we should consider setting the CGAIN flag for particularly
> high currents.  Do you know if it is used for anything else?
> 
I guess we can set CGAIN, but for that high currents, I would also like to know
if there are chances to toast the GTA04. 1.7A would allow you to charge at
1C even when you are using the freerunner heavily. There is something about
a heat protection mode in the manual, but I would really double-check
how and if that works as expected. 1.7A with light load would be more than
1C charging. Would that still be ok for the battery?

Greetings
Andreas Kemnade
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20120327/edcbfee1/attachment.bin>


More information about the Gta04-owner mailing list