[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150305174503.7b3d33cc@notabene.brown>
Date: Thu, 5 Mar 2015 17:45:03 +1100
From: NeilBrown <neilb@...e.de>
To: Pavel Machek <pavel@....cz>
Cc: Samuel Ortiz <sameo@...ux.intel.com>,
Tony Lindgren <tony@...mide.com>,
Lee Jones <lee.jones@...aro.org>,
Sebastian Reichel <sre@...nel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
GTA04 owners <gta04-owner@...delico.com>,
linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: Re: [PATCH 15/15] twl4030_charger: assume a 'charger' can supply
maximum current.
On Mon, 2 Mar 2015 22:29:39 +0100 Pavel Machek <pavel@....cz> wrote:
> On Tue 2015-02-24 15:33:53, NeilBrown wrote:
> > If it cannot, we will stop pulling more current when voltage drops.
>
> Can you justify it a bit more?
>
> I mean... maybe there's a fuse in the charger? Or maybe it will supply
> the current but overheat in the process? (USB_MAX_CURRENT is 500mA or
> 1.7A?)
USB_MAX_CURRENT is 1.7A - the most the twl4030 will manage.
The relevant specs say that a charger can deliver from 0.5A to 5.0A at between
4.75 and 5.25 volts.
They don't, as far as I can tell, describe how a gadget can determine where
in those ranges the charger is actually happy.
My understanding of electronics suggests that if you start to pull too much
current, the voltage will start to drop. It is that voltage drop across
internal resistance which causes over-heating.
So if voltage is above 4.75 volts, it seems reasonable to assume that the
charger is happy.
The code currently (see previous patch) ramps up the current until the
voltage drops below 4.75, or until the maximum is reached.
If the voltage drops, it backs off.
The current should only be too high for 100ms. Hopefully not too long.
I'm very open if anyone can suggest a more safe way to make full use of a
charger without risking excess current draw, but I cannot find one.
Maybe I should measure the unloaded voltage, and not let it drop more than
0.25V below that?
I'm also very open to someone finding out how to get the twl4030 to detect a
"D+ and D- shorted" charger. I think it is supposed to be able to do this,
but I haven't managed to make it work yet.
Thanks,
NeilBrown
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists